1 .\" Copyright (c) 2005 Michael Kerrisk
2 .\" based on earlier work by faith@cs.unc.edu and
3 .\" Mike Battersby <mib@deakin.edu.au>
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date. The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein. The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
25 .\" 2005-09-15, mtk, Created new page by splitting off from sigaction.2
27 .TH SIGPROCMASK 2 2005-09-15 "Linux 2.6.13" "Linux Programmer's Manual"
29 sigprocmask \- examine and change blocked signals
31 .B #include <signal.h>
33 .BI "int sigprocmask(int " how ", const sigset_t *" set ,
34 .BI "sigset_t *" oldset );
37 is used to change the signal mask, the set of currently blocked signals.
38 The behaviour of the call is dependent on the value of
44 The set of blocked signals is the union of the current set and the
51 are removed from the current set of blocked signals. It is legal to
52 attempt to unblock a signal which is not blocked.
55 The set of blocked signals is set to the argument
61 is non\-null, the previous value of the signal mask is stored in
66 is NULL, then the signal mask is unchanged (i.e.,
69 but the current value of the signal mask is nevertheless returned in
75 is unspecified in a multithreaded process; see
76 .BR pthread_sigmask (3).
79 returns 0 on success and \-1 on error.
82 The value specified in
86 It is not possible to block
87 .BR SIGKILL " or " SIGSTOP .
88 Attempts to do so are silently ignored.
97 while they are blocked, the result is undefined,
98 unless the signal was generated by the
106 for details on manipulating signal sets.
118 .BR pthread_sigmask (3),