.\" 2007-10-26 mdw added wording that a sigset_t must be initialized
.\" prior to use
.\"
-.TH SIGSETOPS 3 2013-04-19 "Linux" "Linux Programmer's Manual"
+.TH SIGSETOPS 3 2016-03-15 "Linux" "Linux Programmer's Manual"
.SH NAME
sigemptyset, sigfillset, sigaddset, sigdelset, sigismember \- POSIX
-signal set operations.
+signal set operations
.SH SYNOPSIS
.B #include <signal.h>
-.sp
+.PP
.BI "int sigemptyset(sigset_t *" set );
-.sp
+.PP
.BI "int sigfillset(sigset_t *" set );
-.sp
+.PP
.BI "int sigaddset(sigset_t *" set ", int " signum );
-.sp
+.PP
.BI "int sigdelset(sigset_t *" set ", int " signum );
-.sp
+.PP
.BI "int sigismember(const sigset_t *" set ", int " signum );
-.sp
+.PP
.in -4n
Feature Test Macro Requirements for glibc (see
.BR feature_test_macros (7)):
.in
-.sp
+.PP
.ad l
.BR sigemptyset (),
.BR sigfillset (),
.BR sigdelset (),
.BR sigismember ():
.RS 4
-_POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE
+_POSIX_C_SOURCE
.RE
.ad b
.SH DESCRIPTION
0 if
.I signum
is not a member, and \-1 on error.
+.PP
On error, these functions set
.I errno
-to indicate the cause.
+to indicate the cause of the error.
.SH ERRORS
.TP
.B EINVAL
-.I sig
+.I signum
is not a valid signal.
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lbw31 lb lb
+l l l.
+Interface Attribute Value
+T{
+.BR sigemptyset (),
+.BR sigfillset (),
+.br
+.BR sigaddset (),
+.BR sigdelset (),
+.br
+.BR sigismember (),
+.BR sigisemptyset (),
+.br
+.BR sigorset (),
+.BR sigandset ()
+T} Thread safety MT-Safe
+.TE
.SH CONFORMING TO
-POSIX.1-2001.
+POSIX.1-2001, POSIX.1-2008.
.SH NOTES
-.SS Glibc notes
+When creating a filled signal set, the glibc
+.BR sigfillset ()
+function does not include the two real-time signals used internally
+by the NPTL threading implementation.
+See
+.BR nptl (7)
+for details.
+.\"
+.SS Glibc extensions
If the
.B _GNU_SOURCE
feature test macro is defined, then \fI<signal.h>\fP
exposes three other functions for manipulating signal
-sets.
-.TP
-.BI "int sigisemptyset(sigset_t *" set );
+sets:
+.PP
+.nf
+.BI "int sigisemptyset(const sigset_t *" set );
+.BI "int sigorset(sigset_t *" dest ", const sigset_t *" left ,
+.BI " const sigset_t *" right );
+.BI "int sigandset(sigset_t *" dest ", const sigset_t *" left ,
+.BI " const sigset_t *" right );
+.fi
+.PP
+.BR sigisemptyset ()
returns 1 if
.I set
contains no signals, and 0 otherwise.
-.TP
-.BI "int sigorset(sigset_t *" dest ", sigset_t *" left \
-", sigset_t *" right );
+.PP
+.BR sigorset ()
places the union of the sets
.I left
and
.I right
in
.IR dest .
-.TP
-.BI "int sigandset(sigset_t *" dest ", sigset_t *" left \
-", sigset_t *" right );
+.BR sigandset ()
places the intersection of the sets
.I left
and
.I right
in
.IR dest .
-.PP
-.BR sigorset ()
-and
-.BR sigandset ()
-return 0 on success, and \-1 on failure.
+Both functions return 0 on success, and \-1 on failure.
.PP
These functions are nonstandard (a few other systems provide similar
functions) and their use should be avoided in portable applications.