add new chinese translations

This commit is contained in:
2024-12-30 15:25:56 +08:00
parent a850046d7b
commit 0d798759fd
5418 changed files with 105800 additions and 7052 deletions

View File

@@ -1,21 +1,16 @@
# trap
> 进程或操作系统接收到信号后自动执行命令。
> 可用于对用户中断或其他操作执行清理
> 更多信息:<https://manned.org/trap.1posix>.
> 事件发生时执行命令。
> 更多信息:<https://manned.org/trap.1posix>
- 列出设置 trap 的可用信号
- 列出命令和预期事件的名称
`trap -l`
`trap`
- 列出当前 shell 程序的活动 trap 程序
- 在接收到信号时执行命令
`trap -p`
`trap 'echo "捕获到信号 {{SIGHUP}}"' {{HUP}}`
- 设置 trap 以在检测到一个或多个信号时执行命令:
- 移除命令:
`trap 'echo "检测到信号 {{SIGHUP}}"' {{SIGHUP}}`
- 移除活动 trap
`trap - {{SIGHUP}} {{SIGINT}}`
`trap - {{HUP}} {{INT}}`