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.
52

ERRORS

54       EINVAL sig is not a valid signal.
55

CONFORMING TO

57       POSIX.1-2001.
58

NOTES

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

SEE ALSO

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

COLOPHON

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