SIGTERM、SIGKILL、SIGINT和SIGQUIT的区别
2012-02-29 10:31
281 查看
来自wiki
1. SIGQUIT:
On POSIX-compliant platforms, SIGQUIT is the signal sent to a process by its controlling terminal when the user requests that the process perform a core dump. SIGQUIT can usually be induced with Control-\. On Linux, one may also use Ctrl-4 or, on the virtual
console, the SysRq key.
2. SIGTERM:
SIGTERM is the default signal sent to a process by the kill or killall commands. It causes the termination of a process, but unlike the SIGKILL signal, it can be caught and interpreted (or ignored) by the process. Therefore, SIGTERM is akin to asking a process
to terminate nicely, allowing cleanup and closure of files. For this reason, on many Unix systems during shutdown, init issues SIGTERM to all processes that are not essential to powering off, waits a few seconds, and then issues SIGKILL to forcibly terminate
any such processes that remain.
3. SIGINT:
On POSIX-compliant platforms, SIGINT is the signal sent to a process by its controlling terminal when a user wishes to interrupt the process. SIGINT is sent when the user on the process' controlling terminal presses the interrupt the running process key — typically
Control-C, but on some systems, the "delete" character or "break" key.
4. SIGKILL:
On POSIX-compliant platforms, SIGKILL is the signal sent to a process to cause it to terminate immediately. When sent to a program, SIGKILL causes it to terminate immediately. In contrast to SIGTERM and SIGINT, this signal cannot be caught or ignored, and the
receiving process cannot perform any clean-up upon receiving this signal.
1. SIGQUIT:
On POSIX-compliant platforms, SIGQUIT is the signal sent to a process by its controlling terminal when the user requests that the process perform a core dump. SIGQUIT can usually be induced with Control-\. On Linux, one may also use Ctrl-4 or, on the virtual
console, the SysRq key.
2. SIGTERM:
SIGTERM is the default signal sent to a process by the kill or killall commands. It causes the termination of a process, but unlike the SIGKILL signal, it can be caught and interpreted (or ignored) by the process. Therefore, SIGTERM is akin to asking a process
to terminate nicely, allowing cleanup and closure of files. For this reason, on many Unix systems during shutdown, init issues SIGTERM to all processes that are not essential to powering off, waits a few seconds, and then issues SIGKILL to forcibly terminate
any such processes that remain.
3. SIGINT:
On POSIX-compliant platforms, SIGINT is the signal sent to a process by its controlling terminal when a user wishes to interrupt the process. SIGINT is sent when the user on the process' controlling terminal presses the interrupt the running process key — typically
Control-C, but on some systems, the "delete" character or "break" key.
4. SIGKILL:
On POSIX-compliant platforms, SIGKILL is the signal sent to a process to cause it to terminate immediately. When sent to a program, SIGKILL causes it to terminate immediately. In contrast to SIGTERM and SIGINT, this signal cannot be caught or ignored, and the
receiving process cannot perform any clean-up upon receiving this signal.
相关文章推荐
- SIGTERM、SIGKILL、SIGINT和SIGQUIT的区别
- Linux信号SIGTERM、SIGKILL、SIGINT和SIGQUIT的区别
- sigterm sigint sigkill 区别
- SIGINT、SIGQUIT、 SIGTERM、SIGSTOP区别
- sigterm sigint sigkill 区别
- sigterm sigint sigkill 区别 .
- SIGINT,SIGQUIT,SIGTERM等终止进程信号的区别
- sigint\sigterm\sigkill
- sigint sigterm 的区别
- sigint sigterm 有什么区别啊
- Linux的Signal及Singal处理(SIGQUIT SIGKILL SIGBUS等)
- 程序捕获退出信号(SIGINT,SIGQUIT,SIGTERM)
- SIGKILL 和 SIGTERM
- linux信号 SIGINT SIGTERM SIGKILL
- sigint sigterm 的区别
- 信号 解释 / SIGSTERM SIGKILL 区别
- Linux中与进程终止相关的信号SIGTERM,SIGKILL,SIGINT
- 关于SIGKILL SIGQUIT
- WM_CLOSE,WM_QUIT,WM_DESTROY区别!
- VC WM_CLOSE,WM_QUIT,WM_DESTROY三个消息什么区别?