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 2014-04-14 "Linux" "Linux Programmer's Manual"
33 sigemptyset, sigfillset, sigaddset, sigdelset, sigismember \- POSIX
36 .B #include <signal.h>
38 .BI "int sigemptyset(sigset_t *" set );
40 .BI "int sigfillset(sigset_t *" set );
42 .BI "int sigaddset(sigset_t *" set ", int " signum );
44 .BI "int sigdelset(sigset_t *" set ", int " signum );
46 .BI "int sigismember(const sigset_t *" set ", int " signum );
49 Feature Test Macro Requirements for glibc (see
50 .BR feature_test_macros (7)):
60 _POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE
64 These functions allow the manipulation of POSIX signal sets.
67 initializes the signal set given by
69 to empty, with all signals excluded from the set.
74 to full, including all signals.
79 add and delete respectively signal
92 must be initialized by a call to either
96 before being passed to the functions
101 or the additional glibc functions described below
102 .RB ( sigisemptyset (),
106 The results are undefined if this is not done.
113 return 0 on success and \-1 on error.
122 is not a member, and \-1 on error.
123 On error, these functions set
125 to indicate the cause.
130 is not a valid signal.
132 .SS Multithreading (see pthreads(7))
139 .BR sigisemptyset (),
143 functions are thread-safe.
150 feature test macro is defined, then \fI<signal.h>\fP
151 exposes three other functions for manipulating signal
155 .BI "int sigisemptyset(const sigset_t *" set );
156 .BI "int sigorset(sigset_t *" dest ", const sigset_t *" left ,
157 .BI " const sigset_t *" right );
158 .BI "int sigandset(sigset_t *" dest ", const sigset_t *" left ,
159 .BI " const sigset_t *" right );
165 contains no signals, and 0 otherwise.
168 places the union of the sets
175 places the intersection of the sets
181 Both functions return 0 on success, and \-1 on failure.
183 These functions are nonstandard (a few other systems provide similar
184 functions) and their use should be avoided in portable applications.
191 This page is part of release 3.67 of the Linux
194 A description of the project,
195 information about reporting bugs,
196 and the latest version of this page,
198 \%http://www.kernel.org/doc/man\-pages/.