1SIGNAL(7) Linux Programmer's Manual SIGNAL(7)
2
3
4
6 signal - overview of signals
7
9 Linux supports both POSIX reliable signals (hereinafter "standard sig‐
10 nals") and POSIX real-time signals.
11
12 Signal dispositions
13 Each signal has a current disposition, which determines how the process
14 behaves when it is delivered the signal.
15
16 The entries in the "Action" column of the table below specify the
17 default disposition for each signal, as follows:
18
19 Term Default action is to terminate the process.
20
21 Ign Default action is to ignore the signal.
22
23 Core Default action is to terminate the process and dump core (see
24 core(5)).
25
26 Stop Default action is to stop the process.
27
28 Cont Default action is to continue the process if it is currently
29 stopped.
30
31 A process can change the disposition of a signal using sigaction(2) or
32 signal(2). (The latter is less portable when establishing a signal
33 handler; see signal(2) for details.) Using these system calls, a
34 process can elect one of the following behaviors to occur on delivery
35 of the signal: perform the default action; ignore the signal; or catch
36 the signal with a signal handler, a programmer-defined function that is
37 automatically invoked when the signal is delivered.
38
39 By default, a signal handler is invoked on the normal process stack.
40 It is possible to arrange that the signal handler uses an alternate
41 stack; see sigaltstack(2) for a discussion of how to do this and when
42 it might be useful.
43
44 The signal disposition is a per-process attribute: in a multithreaded
45 application, the disposition of a particular signal is the same for all
46 threads.
47
48 A child created via fork(2) inherits a copy of its parent's signal dis‐
49 positions. During an execve(2), the dispositions of handled signals
50 are reset to the default; the dispositions of ignored signals are left
51 unchanged.
52
53 Sending a signal
54 The following system calls and library functions allow the caller to
55 send a signal:
56
57 raise(3) Sends a signal to the calling thread.
58
59 kill(2) Sends a signal to a specified process, to all members
60 of a specified process group, or to all processes on
61 the system.
62
63 killpg(3) Sends a signal to all of the members of a specified
64 process group.
65
66 pthread_kill(3) Sends a signal to a specified POSIX thread in the same
67 process as the caller.
68
69 tgkill(2) Sends a signal to a specified thread within a specific
70 process. (This is the system call used to implement
71 pthread_kill(3).)
72
73 sigqueue(3) Sends a real-time signal with accompanying data to a
74 specified process.
75
76 Waiting