1 .\" Copyright (c) 1994 Mike Battersby
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date. The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein. The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
25 .\" Modified by aeb, 960721
26 .\" 2005-11-21, mtk, added descriptions of sigisemptyset(), sigandset(),
28 .\" 2007-10-26 mdw added wording that a sigset_t must be initialized
31 .TH SIGSETOPS 3 2021-03-22 "Linux" "Linux Programmer's Manual"
33 sigemptyset, sigfillset, sigaddset, sigdelset, sigismember \- POSIX
37 .B #include <signal.h>
39 .BI "int sigemptyset(sigset_t *" set );
40 .BI "int sigfillset(sigset_t *" set );
42 .BI "int sigaddset(sigset_t *" set ", int " signum );
43 .BI "int sigdelset(sigset_t *" set ", int " signum );
45 .BI "int sigismember(const sigset_t *" set ", int " signum );
49 Feature Test Macro Requirements for glibc (see
50 .BR feature_test_macros (7)):
62 These functions allow the manipulation of POSIX signal sets.
65 initializes the signal set given by
67 to empty, with all signals excluded from the set.
72 to full, including all signals.
77 add and delete respectively signal
90 must be initialized by a call to either
94 before being passed to the functions
99 or the additional glibc functions described below
100 .RB ( sigisemptyset (),
104 The results are undefined if this is not done.
111 return 0 on success and \-1 on error.
120 is not a member, and \-1 on error.
122 On error, these functions set
124 to indicate the error.
129 is not a valid signal.
131 For an explanation of the terms used in this section, see
139 Interface Attribute Value
146 .BR sigisemptyset (),
149 T} Thread safety MT-Safe
155 POSIX.1-2001, POSIX.1-2008.
157 When creating a filled signal set, the glibc
159 function does not include the two real-time signals used internally
160 by the NPTL threading implementation.
168 feature test macro is defined, then \fI<signal.h>\fP
169 exposes three other functions for manipulating signal
173 .BI "int sigisemptyset(const sigset_t *" set );
174 .BI "int sigorset(sigset_t *" dest ", const sigset_t *" left ,
175 .BI " const sigset_t *" right );
176 .BI "int sigandset(sigset_t *" dest ", const sigset_t *" left ,
177 .BI " const sigset_t *" right );
183 contains no signals, and 0 otherwise.
186 places the union of the sets
193 places the intersection of the sets
199 Both functions return 0 on success, and \-1 on failure.
201 These functions are nonstandard (a few other systems provide similar
202 functions) and their use should be avoided in portable applications.