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 >= 1 || _XOPEN_SOURCE || _POSIX_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.  On error, these functions set errno  to
52       indicate the cause.
53

ERRORS

55       EINVAL sig is not a valid signal.
56

CONFORMING TO

58       POSIX.1-2001.
59

NOTES

61   Glibc notes
62       If  the  _GNU_SOURCE  feature  test  macro  is defined, then <signal.h>
63       exposes three other functions for manipulating signal sets.
64
65       int sigisemptyset(sigset_t *set);
66              returns 1 if set contains no signals, and 0 otherwise.
67
68       int sigorset(sigset_t *dest, sigset_t *left, sigset_t *right);
69              places the union of the sets left and right in dest.
70
71       int sigandset(sigset_t *dest, sigset_t *left, sigset_t *right);
72              places the intersection of the sets left and right in dest.
73
74       sigorset() and sigandset() return 0 on success, and -1 on failure.
75
76       These functions are nonstandard (a few other  systems  provide  similar
77       functions) and their use should be avoided in portable applications.
78

SEE ALSO

80       sigaction(2), sigpending(2), sigprocmask(2), sigsuspend(2)
81

COLOPHON

83       This  page  is  part of release 3.53 of the Linux man-pages project.  A
84       description of the project, and information about reporting  bugs,  can
85       be found at http://www.kernel.org/doc/man-pages/.
86
87
88
89Linux                             2013-04-19                      SIGSETOPS(3)
Impressum