Linux Signal Table
Linux supports POSIX standard signals and real-time signals. Below is a brief summary of the Linux signal, with detailed details to see Man 7 signal.
The default action has the following meanings:
term termination process
| Signal |
Take value |
Default action |
Meaning (the cause of the signal) |
| SIGHUP |
1 |
Term |
Terminal hangs or process death |
| SIGINT |
2 |
Term |
Interrupt signal from the keyboard |
| Sigquit |
3 |
Core |
Departure signal from the keyboard |
| Sigill |
4 |
Core |
Illegal instructions |
| Sigabrt |
6 |
Core |
Abnormal signal from abort |
| SIGFPE |
8 |
Core |
Floating-point exceptions |
| SIGKILL |
9 |
Term |
Kill |
| SIGSEGV |
11 |
Core |
Segment illegal error (invalid memory reference) |
| Sigpipe |
13 |
Term |
Pipeline corruption: Write data to a pipeline that does not have a read process |
| Sigalrm |
14 |
Term |
Timer-to-time signal from alarm |
| SIGTERM |
15 |
Term |
Terminate |
| SIGUSR1 |
30,10,16 |
Term |
User-defined Signal 1 |
| SIGUSR2 |
31,12,17 |
Term |
User-defined Signal 2 |
| SIGCHLD |
20,17,18 |
Ign |
Child process stopped or terminated |
| Sigcont |
19,18,25 |
Cont |
If stopped, continue execution |
| SIGSTOP |
17,19,23 |
Stop |
Stop signal not from the terminal |
| Sigtstp |
18,20,24 |
Stop |
Stop signal from the terminal |
| Sigttin |
21,21,26 |
Stop |
Background process Read Terminal |
| Sigttou |
22,22,27 |
Stop |
Background Process Write Terminal |
| |
|
|
|
| Sigbus |
10,7,10 |
Core |
Bus Error (Memory access error) |
| Sigpoll |
|
Term |
Pollable event Occurrence (Sys V), synonymous with Sigio |
| Sigprof |
27,27,29 |
Term |
Statistical distribution chart with timers to the time |
| Sigsys |
,-, 12 |
Core |
Illegal system call (SVR4) |
| SIGTRAP |
5 |
Core |
Trace/Breakpoint Self-trapping |
| Sigurg |
16,23,21 |
Ign |
Socket emergency signal (4.2BSD) |
| Sigvtalrm |
26,26,28 |
Term |
Virtual timer to time (4.2BSD) |
| Sigxcpu |
24,24,30 |
Core |
CPU Time Exceeded (4.2BSD) |
| Sigxfsz |
25,25,31 |
Core |
File length limit exceeded (4.2BSD) |
| |
|
|
|
| Sigiot |
6 |
Core |
IoT self-trapping, synonymous with SIGABRT |
| Sigemt |
7,-, 7 |
|
Term |
| Sigstkflt |
-,16,- |
Term |
Coprocessor stack error (not used) |
| SIGIO |
23,29,22 |
Term |
I/O can be performed on a descriptor |
| Sigcld |
-,-, 18 |
Ign |
Synonymous with SIGCHLD |
| Sigpwr |
29,30,19 |
Term |
Power failure (System V) |
| Siginfo |
,-,- |
|
Synonymous with SIGPWR |
| Siglost |
-,-,- |
Term |
File Lock missing |
| Sigwinch |
28,28,20 |
Ign |
Window size Change (4.3BSD, Sun) |
| Sigunused |
-,31,- |
Term |
Signal not used (would be sigsys) |
Description
Some of the values of the signals are hardware-related (General Alpha and SPARC architectures with the first value, i386, PPC, and SH schemas with intermediate values, the MIPS schema with a third value, which indicates that the value of the corresponding schema is unknown).
The blue is the posix.1-1990 standard signal.
Sigkill and Sigstop signals cannot be hooked, blocked, or ignored.
Cyan is the signal defined by SUSV2 and posix.1-2001.
Prior to the Linux 2.2 (including) kernel, the default action for Sigsys, SIGXCPU, Sigxfsz, and Sigbus (except for SPARC and MIPS architectures) was to terminate the process, but without core dump. Linux 2.4 follows the posix.1-2001 requirements, and the default action for these signals is changed to: terminate the process and do core dump at the same time.
Orange is the other common signal.
The Signal 29 is SIGINFO/SIGPWR on Alpha and siglost on SPARC.
SIGEMT is not described in posix.1-2001, but is still visible in most unices, the typical default action is to terminate the process and do the core dump.
SIGPWR is not described in posix.1-2001, the typical default action in some unices that use it is to ignore.
Sigio is not described in posix.1-2001, the typical default action in some unices that use it is to ignore.
Processes can change the default processing of signals by using sigaction and signal system calls (using the signal is poor portability). The process can choose one of the following 3 signal processing methods:
1, perform the default operation;
2, ignoring the signal;
3. Captures the signal, but invokes the custom handler function through the signal handle.
The signal may be blocked. Each thread in the process has a separate signal mask to indicate that the signal for this thread is blocked. The thread uses the Pthread_sigmask to set its signal mask. Single-threaded programs can use Sigprocmask to manipulate signal masks. In a multithreaded program, the default behavior for all threads to handle a specified signal is the same.
Linux Signal List