1 .\" Copyright (c) 1994 Mike Battersby
3 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
5 .\" Modified by aeb, 960721
6 .\" 2005-11-21, mtk, added descriptions of sigisemptyset(), sigandset(),
8 .\" 2007-10-26 mdw added wording that a sigset_t must be initialized
11 .TH SIGSETOPS 3 2021-03-22 "Linux man-pages (unreleased)"
13 sigemptyset, sigfillset, sigaddset, sigdelset, sigismember \- POSIX
17 .RI ( libc ", " \-lc )
20 .B #include <signal.h>
22 .BI "int sigemptyset(sigset_t *" set );
23 .BI "int sigfillset(sigset_t *" set );
25 .BI "int sigaddset(sigset_t *" set ", int " signum );
26 .BI "int sigdelset(sigset_t *" set ", int " signum );
28 .BI "int sigismember(const sigset_t *" set ", int " signum );
32 Feature Test Macro Requirements for glibc (see
33 .BR feature_test_macros (7)):
45 These functions allow the manipulation of POSIX signal sets.
48 initializes the signal set given by
50 to empty, with all signals excluded from the set.
55 to full, including all signals.
60 add and delete respectively signal
73 must be initialized by a call to either
77 before being passed to the functions
82 or the additional glibc functions described below
83 .RB ( sigisemptyset (),
87 The results are undefined if this is not done.
94 return 0 on success and \-1 on error.
103 is not a member, and \-1 on error.
105 On error, these functions set
107 to indicate the error.
112 is not a valid signal.
114 For an explanation of the terms used in this section, see
122 Interface Attribute Value
129 .BR sigisemptyset (),
132 T} Thread safety MT-Safe
138 POSIX.1-2001, POSIX.1-2008.
140 When creating a filled signal set, the glibc
142 function does not include the two real-time signals used internally
143 by the NPTL threading implementation.
151 feature test macro is defined, then \fI<signal.h>\fP
152 exposes three other functions for manipulating signal
156 .BI "int sigisemptyset(const sigset_t *" set );
157 .BI "int sigorset(sigset_t *" dest ", const sigset_t *" left ,
158 .BI " const sigset_t *" right );
159 .BI "int sigandset(sigset_t *" dest ", const sigset_t *" left ,
160 .BI " const sigset_t *" right );
166 contains no signals, and 0 otherwise.
169 places the union of the sets
176 places the intersection of the sets
182 Both functions return 0 on success, and \-1 on failure.
184 These functions are nonstandard (a few other systems provide similar
185 functions) and their use should be avoided in portable applications.