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 .\" %%%LICENSE_START(VERBATIM)
6 .\" Permission is granted to make and distribute verbatim copies of this
7 .\" manual provided the copyright notice and this permission notice are
8 .\" preserved on all copies.
10 .\" Permission is granted to copy and distribute modified versions of this
11 .\" manual under the conditions for verbatim copying, provided that the
12 .\" entire resulting derived work is distributed under the terms of a
13 .\" permission notice identical to this one.
15 .\" Since the Linux kernel and libraries are constantly changing, this
16 .\" manual page may be incorrect or out-of-date. The author(s) assume no
17 .\" responsibility for errors or omissions, or for damages resulting from
18 .\" the use of the information contained herein. The author(s) may not
19 .\" have taken the same level of care in the production of this manual,
20 .\" which is licensed free of charge, as they might when working
23 .\" Formatted or processed versions of this manual, if unaccompanied by
24 .\" the source, must acknowledge the copyright and authors of this work.
27 .\" 2005-09-15, mtk, Created new page by splitting off from sigaction.2
29 .TH SIGPROCMASK 2 2013-04-19 "Linux" "Linux Programmer's Manual"
31 sigprocmask \- examine and change blocked signals
33 .B #include <signal.h>
35 .BI "int sigprocmask(int " how ", const sigset_t *" set ,
36 .BI "sigset_t *" oldset );
39 Feature Test Macro Requirements for glibc (see
40 .BR feature_test_macros (7)):
45 _POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE
49 is used to fetch and/or change the signal mask of the calling thread.
50 The signal mask is the set of signals whose delivery is currently
51 blocked for the caller
56 The behavior of the call is dependent on the value of
61 The set of blocked signals is the union of the current set and the
68 are removed from the current set of blocked signals.
69 It is permissible to attempt to unblock a signal which is not blocked.
72 The set of blocked signals is set to the argument
77 is non-NULL, the previous value of the signal mask is stored in
82 is NULL, then the signal mask is unchanged (i.e.,
85 but the current value of the signal mask is nevertheless returned in
91 is unspecified in a multithreaded process; see
92 .BR pthread_sigmask (3).
95 returns 0 on success and \-1 on error.
96 In the event of an error,
98 is set to indicate the cause.
106 argument points outside the process's allocated address space.
109 The value specified in
115 It is not possible to block
116 .BR SIGKILL " or " SIGSTOP .
117 Attempts to do so are silently ignored.
119 Each of the threads in a process has its own signal mask.
123 inherits a copy of its parent's signal mask;
124 the signal mask is preserved across
134 while they are blocked, the result is undefined,
135 unless the signal was generated by
143 for details on manipulating signal sets.
151 .BR pthread_sigmask (3),
156 This page is part of release 3.68 of the Linux
159 A description of the project,
160 information about reporting bugs,
161 and the latest version of this page,
163 \%http://www.kernel.org/doc/man\-pages/.