1 .\" Copyright (c) 1994 Mike Battersby
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date. The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein. The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" Modified by aeb, 960721
24 .\" 2005-11-21, mtk, added descriptions of sigisemptyset(), sigandset(),
26 .\" 2007-10-26 mdw added wording that a sigset_t must be initialized
29 .TH SIGSETOPS 3 2008-09-01 "Linux" "Linux Programmer's Manual"
31 sigemptyset, sigfillset, sigaddset, sigdelset, sigismember \- POSIX
32 signal set operations.
34 .B #include <signal.h>
36 .BI "int sigemptyset(sigset_t *" set );
38 .BI "int sigfillset(sigset_t *" set );
40 .BI "int sigaddset(sigset_t *" set ", int " signum );
42 .BI "int sigdelset(sigset_t *" set ", int " signum );
44 .BI "int sigismember(const sigset_t *" set ", int " signum );
47 Feature Test Macro Requirements for glibc (see
48 .BR feature_test_macros (7)):
57 _POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE
60 These functions allow the manipulation of POSIX signal sets.
63 initializes the signal set given by
65 to empty, with all signals excluded from the set.
70 to full, including all signals.
75 add and delete respectively signal
88 must be initialized by a call to either
92 before being passed to the functions
97 or the additional glibc functions described below
98 .RB ( sigisemptyset (),
102 The results are undefined if this is not done.
109 return 0 on success and \-1 on error.
118 is not a member, and \-1 on error.
123 is not a valid signal.
130 feature test macro is defined, then \fI<signal.h>\fP
131 exposes three other functions for manipulating signal
134 .BI "int sigisemptyset(sigset_t *" set );
137 contains no signals, and 0 otherwise.
139 .BI "int sigorset(sigset_t *" dest ", sigset_t *" left \
140 ", sigset_t *" right );
141 places the union of the sets
148 .BI "int sigandset(sigset_t *" dest ", sigset_t *" left \
149 ", sigset_t *" right );
150 places the intersection of the sets
160 return 0 on success, and \-1 on failure.
162 These functions are nonstandard (a few other systems provide similar
163 functions) and their use should be avoided in portable applications.