1 个评论

在KB上,针对diag sys kill 命令的用法解释中,存在两个不同的说法
1. 建议的信号ID(signal no.)为11 (根据unix以及*unix 系统的说法 信号ID为11的应该是SIGSEGV ),具体的用途:异常终止、结束进程,生成一个核心文件以帮助调试;
<signal> can be any number but 11 is preferred because this signal sends output to the crashlog which can be used by Fortinet Support to troubleshoot problems.

2. 就是如丹丹所说的三种不同的信号ID
SIGINT :来自键盘的中断信号 ( ctrl + c ) . (信号ID2) #我们常用的ctrl +c 退出某个进程
SIGTERM:kill 命令发出 的信号. (信号ID15)
SIGKILL :该信号结束接收信号的进程 . (信号ID9)

Although the <sig_term> is mostly the same as those used on Unix/Unix-like platforms, is recommended to use only SIGINT (2), SIGTERM(15) or SIGKILL(9) in that order.
SIGINT (2): is used as for example the user hits 'Ctrl-C' on keyboard to end a process.
SIGTERM (15): is a "polite" termination signal, asking the process to close connections, files, handlers, buffer, etc. For device stability is the recommended way to end a process.
SIGKILL (9): This is a mandatory termination of the process. This signal couldn't be ignored by system (except by specific conditions where system is waiting the process to free physical I/O resources). This kind of signal could leave sessions and files opened.

上面三个信号ID的使用顺序建议 2 (无效后)→ 15(无效后)→9 ;就像我们在winodws 下某个程序无响应时,一般是先通过程序自身功能来结束,无效再任务管理器结束 再不行 热重启等~