1SIGSETOPS(3)               Linux Programmer's Manual              SIGSETOPS(3)
2
3
4

NAME

6       sigemptyset, sigfillset, sigaddset, sigdelset, sigismember - POSIX sig‐
7       nal set operations
8

SYNOPSIS

10       #include <signal.h>
11
12       int sigemptyset(sigset_t *set);
13
14       int sigfillset(sigset_t *set);
15
16       int sigaddset(sigset_t *set, int signum);
17
18       int sigdelset(sigset_t *set, int signum);
19
20       int sigismember(const sigset_t *set, int signum);
21
22   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
23
24       sigemptyset(), sigfillset(), sigaddset(), sigdelset(), sigismember():
25           _POSIX_C_SOURCE
26

DESCRIPTION

28       These functions allow the manipulation of POSIX signal sets.
29
30       sigemptyset() initializes the signal set given by set  to  empty,  with
31       all signals excluded from the set.
32
33       sigfillset() initializes set to full, including all signals.
34
35       sigaddset()  and  sigdelset() add and delete respectively signal signum
36       from set.
37
38       sigismember() tests whether signum is a member of set.
39
40       Objects of type sigset_t must  be  initialized  by  a  call  to  either
41       sigemptyset()  or  sigfillset()  before  being  passed to the functions
42       sigaddset(), sigdelset() and  sigismember()  or  the  additional  glibc
43       functions  described  below  (sigisemptyset(),  sigandset(),  and  sig‐
44       orset()).  The results are undefined if this is not done.
45

RETURN VALUE

47       sigemptyset(), sigfillset(), sigaddset(), and sigdelset() return  0  on
48       success and -1 on error.
49
50       sigismember()  returns  1  if signum is a member of set, 0 if signum is
51       not a member, and -1 on error.
52
53       On error, these functions set errno to indicate the cause of the error.
54

ERRORS

56       EINVAL signum is not a valid signal.
57

ATTRIBUTES

59       For  an  explanation  of  the  terms  used   in   this   section,   see
60       attributes(7).
61
62       ┌────────────────────────────────┬───────────────┬─────────┐
63Interface                       Attribute     Value   
64       ├────────────────────────────────┼───────────────┼─────────┤
65sigemptyset(), sigfillset(),    │ Thread safety │ MT-Safe │
66sigaddset(), sigdelset(),       │               │         │
67sigismember(), sigisemptyset(), │               │         │
68sigorset(), sigandset()         │               │         │
69       └────────────────────────────────┴───────────────┴─────────┘

CONFORMING TO

71       POSIX.1-2001, POSIX.1-2008.
72

NOTES

74       When creating a filled signal set, the glibc sigfillset() function does
75       not include the two real-time  signals  used  internally  by  the  NPTL
76       threading implementation.  See nptl(7) for details.
77
78   Glibc extensions
79       If  the  _GNU_SOURCE  feature  test  macro  is defined, then <signal.h>
80       exposes three other functions for manipulating signal sets:
81
82       int sigisemptyset(const sigset_t *set);
83       int sigorset(sigset_t *dest, const sigset_t *left,
84                     const sigset_t *right);
85       int sigandset(sigset_t *dest, const sigset_t *left,
86                     const sigset_t *right);
87
88       sigisemptyset() returns 1 if set contains no signals, and 0 otherwise.
89
90       sigorset() places the union  of  the  sets  left  and  right  in  dest.
91       sigandset() places the intersection of the sets left and right in dest.
92       Both functions return 0 on success, and -1 on failure.
93
94       These functions are nonstandard (a few other  systems  provide  similar
95       functions) and their use should be avoided in portable applications.
96

SEE ALSO

98       sigaction(2), sigpending(2), sigprocmask(2), sigsuspend(2)
99

COLOPHON

101       This  page  is  part of release 5.04 of the Linux man-pages project.  A
102       description of the project, information about reporting bugs,  and  the
103       latest     version     of     this    page,    can    be    found    at
104       https://www.kernel.org/doc/man-pages/.
105
106
107
108Linux                             2016-03-15                      SIGSETOPS(3)
Impressum