man 7 signal
Term Default action is to terminate the process.
Ign Default action is to ignore the signal.
Core Default action is to terminate the process and dump core.
Stop Default action is to stop the process.
Signal Value Action Comment
-------------------------------------------------------------------------
SIGHUP 1 Term Hangup detected on controlling terminal
or death of controlling process
SIGINT 2 Term Interrupt from keyboard
SIGQUIT 3 Core Quit from keyboard
SIGILL 4 Core Illegal Instruction
SIGABRT 6 Core Abort signal from abort(3)
SIGBUS 7 Core Bus error (bad memory access)
SIGFPE 8 Core Floating point exception
SIGKILL 9 Term Kill signal
SIGUSR1 10 Term User-defined signal 1
SIGSEGV 11 Core Invalid memory reference
SIGUSR2 12 Term User-defined signal 2
SIGPIPE 13 Term Broken pipe: write to pipe with no readers
SIGALRM 14 Term Timer signal from alarm(2)
SIGTERM 15 Term Termination signal
SIGCHLD 17 Ign Child stopped or terminated
SIGCONT 18 Continue if stopped
SIGSTOP 19 Stop Stop process
SIGTSTP 20 Stop Stop typed at tty
SIGTTIN 21 Stop tty input for background process
SIGTTOU 22 Stop tty output for background process
SIGURG 23 Ign Urgent condition on socket (4.2 BSD)
SIGXCPU 24 Core CPU time limit exceeded (4.2 BSD)
SIGXFSZ 25 Core File size limit exceeded (4.2 BSD)
SIGVTALRM 26 Term Virtual alarm clock (4.2 BSD)
SIGPROF 27 Term Profiling timer expired
SIGWINCH 28 Ign Window resize signal (4.3 BSD, Sun)
SIGIO 29 Term I/O now possible (4.2 BSD)
SIGPWR 30 Term Power failure (System V)
SIGUNUSED 31 Term Unused signal (will be SIGSYS)
The signals SIGKILL and SIGSTOP cannot be caught, blocked, or ignored.
编号为1~31的信号为传统UNIX支持的信号,是不可靠信号(非实时的),编号为32~63的信号是后来扩充的,称做可靠信号(实时信号).不可靠信号和可靠信号的区别在于前者不支持排队,可能会造成信号丢失,而后者不会.
1 SIGHUP
控制进程结束,或者控制终端挂断时产生.
当用户退出登录,同一会话的前后进程组将会收到该信号,默认为退出.
对于与终端脱离关系的守护进程,该信号表示重新读取配置文件.
2 SIGINT
程序终止信号(interrupt).由INTR字符产生(通常为Ctrl-C),用于通知前台进程组终止进程.
3 SIGQUIT
与SIGINT类似,由QUIT字符产生(通常为Ctrl-\),终止进程并产生core文件.
9 SIGKILL
用来立即结束程序的运行.本信号不能被阻塞,处理和忽略.
15 SIGTERM
程序结束信号(term),该信号可被阻塞和处理,kill命令默认发送信号.
17 SIGCHLD
子程序结束,向父进程发送该信号.
19 SIGSTOP
停止进程执行.该进程并没有结束,只是暂停执行.本信号不能被阻塞,处理和忽略.
阅读(1225) | 评论(0) | 转发(0) |