]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/sigsetops.3
Wrapped long lines, wrapped at sentence boundaries; stripped trailing
[thirdparty/man-pages.git] / man3 / sigsetops.3
1 .\" Copyright (c) 1994 Mike Battersby
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date. The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein. The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" Modified by aeb, 960721
24 .\" 2005-11-21, mtk, added descriptions of sigisemptyset(), sigandset(),
25 .\" and sigorset()
26 .\"
27 .TH SIGSETOPS 3 2005-11-17 "Linux 2.6.14" "Linux Programmer's Manual"
28 .SH NAME
29 sigemptyset, sigfillset, sigaddset, sigdelset, sigismember \- POSIX
30 signal set operations.
31 .SH SYNOPSIS
32 .B #include <signal.h>
33 .sp
34 .BI "int sigemptyset(sigset_t *" set );
35 .sp
36 .BI "int sigfillset(sigset_t *" set );
37 .sp
38 .BI "int sigaddset(sigset_t *" set ", int " signum );
39 .sp
40 .BI "int sigdelset(sigset_t *" set ", int " signum );
41 .sp
42 .BI "int sigismember(const sigset_t *" set ", int " signum );
43 .SH DESCRIPTION
44 The
45 .BR sigsetops (3)
46 functions allow the manipulation of POSIX signal sets.
47 .PP
48 .BR sigemptyset ()
49 initializes the signal set given by
50 .I set
51 to empty, with all signals excluded from the set.
52 .PP
53 .BR sigfillset ()
54 initializes
55 .I set
56 to full, including all signals.
57 .PP
58 .BR sigaddset ()
59 and
60 .BR sigdelset ()
61 add and delete respectively signal
62 .I signum
63 from
64 .IR set .
65 .PP
66 .BR sigismember ()
67 tests whether
68 .I signum
69 is a member of
70 .IR set .
71 .SH "RETURN VALUE"
72 .BR sigemptyset (),
73 .BR sigfillset (),
74 .BR sigaddset (),
75 and
76 .BR sigdelset ()
77 return 0 on success and \-1 on error.
78 .PP
79 .BR sigismember ()
80 returns 1 if
81 .I signum
82 is a member of
83 .IR set ,
84 0 if
85 .I signum
86 is not a member, and \-1 on error.
87 .SH ERRORS
88 .TP
89 .B EINVAL
90 .I sig
91 is not a valid signal.
92 .SH "CONFORMING TO"
93 POSIX.1-2001.
94 .SH "GLIBC NOTES"
95 If the _GNU_SOURCE feature test macro is defined, then <signal.h>
96 exposes three other functions for manipulating signal
97 sets.
98 .TP
99 .BI "int sigisemptyset(sigset_t *" set );
100 returns 1 if
101 .I set
102 contains no signals, and 0 otherwise.
103 .TP
104 .BI "int sigorset(sigset_t *" dest ", sigset_t *" left \
105 ", sigset_t *" right );
106 places the union of the sets
107 .I left
108 and
109 .I right
110 in
111 .IR dest .
112 .TP
113 .BI "int sigandset(sigset_t *" dest ", sigset_t *" left \
114 ", sigset_t *" right );
115 places the intersection of the sets
116 .I left
117 and
118 .I right
119 in
120 .IR dest .
121 .PP
122 .BR sigorset ()
123 and
124 .BR sigandset ()
125 return 0 on success, and \-1 on failure.
126 .PP
127 These functions are non-standard (a few other systems provide similar
128 functions) and their use should be avoided in portable applications.
129 .SH "SEE ALSO"
130 .BR sigaction (2),
131 .BR sigpending (2),
132 .BR sigprocmask (2),
133 .BR sigsuspend (2)