linux kill -l signal list

List, numbered 1 to 31 signals for the traditional UNIX support signal is not reliable signal (non-real), numbered 32 to 63 of the signal is later expanded, known as a reliable signal (real-time signal). The difference between reliable and unreliable signal signal is that the former does not support queue, may cause loss of signal, but not the latter.
Here we discuss the signal is less than the number of SIGRTMIN.
1) SIGHUP
This signal is connected to the user terminal (emitted at the end of normal or abnormal), typically at the end of the process control terminal, notifies each of the session in the same job, and this time they are no longer associated control terminal.
When you log Linux, the system will assign the user to a login terminal (Session). In the end all programs running, including background and foreground process group process group, generally belong to this Session. When the user exits Linux login, foreground and background process group have to process the output terminal will receive a SIGHUP signal. The default action of this signal is to terminate the process, and therefore have the background and the foreground process group process output terminal will be suspended. But it can capture the signal, such as wget can capture SIGHUP signal and ignore it, so even out of the Linux login, wget can continue to download.
In addition, the terminal from the daemon relations, this signal is used to inform it to reread its configuration file.
2) SIGINT
program termination (interrupt) signal is sent when the user types the INTR character (usually Ctrl-C), is used to notify the foreground process group to terminate the process.
3) SIGQUIT
and SIGINT similar, but the QUIT character (usually Ctrl- \) to control. In the process due to receipt of producing a core file SIGQUIT exit, similar to a program error signal in this sense.
4) SIGILL
performed an illegal instruction error usually occurs because the executable file itself, or try to perform a data segment. It is also possible to generate a stack overflow when this signal.
5) SIGTRAP
generated by a breakpoint instruction trap or other instructions used by the Debugger.
6) SIGABRT
call function signal generated abort.
7) SIGBUS
illegal address, memory address comprising alignment (Alignment) error. Such as access to a long integer words, but the address is not a multiple of 4. It differs from SIGSEGV is that the latter is due to the unauthorized access to the memory address of a legitimate trigger (such as access is not his own storage space or a read-only memory).
8) SIGFPE
issued at the time of the fatal arithmetic error occurs not only includes floating-point error also includes overflow and divide by zero all the other arithmetic and other errors.
9) SIGKILL
used to run the program immediately ends. This signal can not be blocked, and the processing is ignored. If the administrator can not find a process to terminate, you can try to send this signal.
10) SIGUSR1
left to the user to use
11) SIGSEGV
attempt to access its own memory not allocated to, or attempt to not have write access to the memory address to write data.
12) SIGUSR2
left to the user to use
13) SIGPIPE
pipe rupture. This signal is typically generated in the inter-process communication, such as using two processes FIFO (pipe) to communicate, read the pipeline did not go out into the open or terminated unexpectedly pipe write, write process will receive a SIGPIPE signal. Also with two processes Socket Communications, the writing process when writing the Socket, the reading process has been terminated.
14) SIGALRM
clock timing signals, calculating the actual time or clock time. Alarm function using the signal.
15) a SIGTERM
End of program (Terminate) signal, and SIGKILL except that the signal can be blocked and processed. Often used to ask an application exits normally, shell command kill default generate this signal. If the process is not terminated, we will try SIGKILL.
17) SIGCHLD
at the end of the child, the parent will receive the signal.
If the parent does not handle this signal, there is no wait (wait) the child, although the child process to terminate, but also possession of entries in the kernel process table, then the child process is called a zombie process. In this case we should avoid (the parent process or ignore SIGCHILD signal, or capturing it, or wait it derived the child, or parent process to terminate, then the child process to terminate automatically be taken over by the init process).
18) SIGCONT
make a stop (stopped) process continues. This signal can not be blocked. May use a handler to let the program accomplish a specific task when stopped by the state to continue. For example, display the prompt re ...
19) SIGSTOP
. stop (stopped) process and the implementation of its attention and interrupt the difference terminate: the process is not over, just suspend the implementation of this signal can not be blocked, processed or ignored..
20) SIGTSTP
stop running process, but the signal processing and can be ignored. this signal is sent when the user types the SUSP character (usually the Z-is-Ctrl)
21) SIGTTIN
when a background job from the user terminal to read data, all processes in the job will receive SIGTTIN signal. the default these processes will stop execution.
22) SIGTTOU
similar SIGTTIN, but received when writing terminal (or modify terminal mode).
23) SIGURG
The "urgent" data or out-of-band data is generated when reaching the socket.
24) SIGXCPU is
exceeded CPU time limit. This limit may be read by getrlimit / setrlimit / change.
25) SIGXFSZ
when the process attempted to expand the file so that the file size exceeds the resource limit.
26) SIGVTALRM
virtual clock signals similar to SIGALRM, but the process is calculated CPU time.
27) SIGPROF
similar SIGALRM / SIGVTALRM, but the process by including CPU time and the time of system calls.
28) SIGWINCH
window size issued changing.
29) SIGIO
file descriptor is ready to start the input / output operations.
30) SIGPWR
Power failure
31) SIGSYS
illegal system call.
In the signal listed above, the program can not be captured, blocked or ignored signals are: SIGKILL, SIGSTOP
can not be restored to the default action of the signal have: SIGILL, SIGTRAP
default would lead to miscarriage signal process are: SIGABRT, SIGBUS, SIGFPE, SIGILL , SIGIOT, SIGQUIT, SIGSEGV, SIGTRAP , SIGXCPU, SIGXFSZ
The default would cause the process to exit signal there: SIGALRM, SIGHUP, SIGINT, SIGKILL , SIGPIPE, SIGPOLL, SIGPROF, SIGSYS, SIGTERM, SIGUSR1, SIGUSR2, SIGVTALRM
default would cause the process to stop the signal has: SIGSTOP, SIGTSTP, SIGTTIN, SIGTTOU
default process ignore the signal has: SIGCHLD, SIGPWR, SIGURG, SIGWINCH
addition, SIGIO is in SVR4 exit, is ignored in 4.3BSD; SIGCONT suspended when the process is to continue, otherwise it is ignored and can not be blocked

1. Starting from the signals are preferably defined SIGRTMIN, it is preferable to retain the first few. For example SIGRTMIN + 10.
2. Use kill (0, signo) custom signal is sent, the process and all child processes (initiated by exec, etc.) must have a corresponding handler, otherwise all processes exit.

Guess you like

Origin www.cnblogs.com/xiao0913/p/11846212.html