1SIGPROCMASK(2) Linux Programmer's Manual SIGPROCMASK(2)
2
3
4
6 sigprocmask - examine and change blocked signals
7
9 #include <signal.h>
10
11 int sigprocmask(int how, const sigset_t *set, sigset_t *oldset);
12
14 sigprocmask() is used to change the signal mask, the set of currently
15 blocked signals. The behaviour of the call is dependent on the value
16 of how, as follows.
17
18 SIG_BLOCK
19 The set of blocked signals is the union of the current
20 set and the set argument.
21
22 SIG_UNBLOCK
23 The signals in set are removed from the current set of
24 blocked signals. It is legal to attempt to unblock a
25 signal which is not blocked.
26
27 SIG_SETMASK
28 The set of blocked signals is set to the argument set.
29
30 If oldset is non-null, the previous value of the signal mask is stored
31 in oldset.
32
33 If set is NULL, then the signal mask is unchanged (i.e., how is
34 ignored), but the current value of the signal mask is nevertheless
35 returned in oldset (it is not NULL).
36
37 The use of sigprocmask() is unspecified in a multithreaded process; see
38 pthread_sigmask(3).
39
41 sigprocmask() returns 0 on success and -1 on error.
42
44 EINVAL The value specified in how was invalid.
45
47 It is not possible to block SIGKILL or SIGSTOP. Attempts to do so are
48 silently ignored.
49
50 If SIGBUS, SIGFPE, SIGILL, or SIGSEGV are generated while they are
51 blocked, the result is undefined, unless the signal was generated by
52 the kill(2), sigqueue(2), or raise(3).
53
54 See sigsetops(3) for details on manipulating signal sets.
55
57 POSIX.1-2001.
58
60 kill(2), pause(2), sigaction(2), signal(2), sigpending(2), sigproc‐
61 mask(2), sigqueue(2), sigsuspend(2), pthread_sigmask(3), sigsetops(3),
62 signal(7)
63
64
65
66Linux 2.6.13 2005-09-15 SIGPROCMASK(2)