Repository navigation
Expand file tree
/
Copy pathsigset.3
More file actions
85 lines (83 loc) · 1.82 KB
/
Copy pathsigset.3
File metadata and controls
85 lines (83 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
981D
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
.TH SIGSET 3
.SH NAME
sigset, sigaddset, sigdelset, sigemptyset, sigfillset, sigismember \- manipulate signal sets
.SH SYNOPSIS
.ft B
#include <signal.h>
.nf
int sigaddset(sigset_t *\fIset\fP, int \fIsig\fP)
int sigdelset(sigset_t *\fIset\fP, int \fIsig\fP)
int sigemptyset(sigset_t *\fIset\fP)
int sigfillset(sigset_t *\fIset\fP)
int sigismember(const sigset_t *\fIset\fP, int \fIsig\fP)
.fi
.ft P
.SH DESCRIPTION
The system calls that handle signals, such as
.BR sigaction (2)
and
.BR sigprocmask (2)
use sets of signals to keep a process from being interrupted by those
signals while executing a signal handler or a critical code segment. These
signal sets are manipulated by the following functions:
.TP 5
.B "int sigaddset(sigset_t *\fIset\fP, int \fIsig\fP)"
Add signal
.I sig
to the signal set referenced by
.IR set .
.TP
.B "int sigdelset(sigset_t *\fIset\fP, int \fIsig\fP)"
Remove signal
.I sig
from the signal set referenced by
.IR set .
.TP
.B "int sigemptyset(sigset_t *\fIset\fP)"
Initialize the signal set referenced by
.I set
to an empty set.
.TP
.B "int sigfillset(sigset_t *\fIset\fP)"
Initialize the signal set referenced by
.I set
to an full set, i.e. all signals are in the set.
.TP
.B "int sigismember(const sigset_t *\fIset\fP, int \fIsig\fP)"
Return
.B 1
if the signal
.I sig
is present in the set referenced by
.IR set ,
.B 0
otherwise.
.SH "SEE ALSO"
.BR sigaction (2),
.BR sigpending (2),
.BR sigprocmask (2),
.BR sigsuspend (2).
.SH DIAGNOSTICS
All functions except
.B sigismember
return
.B 0
on success.
.B Sigismember
returns
.B 0
or
.B 1
on success. They return
.B \-1
with error code
.B EINVAL
for an invalid signal number. (They do not use
.B EFAULT
for a bad
.I set
address, but will simply cause a segmentation violation.)
.SH AUTHOR
Kees J. Bot (kjb@cs.vu.nl)
.\"
.\" $PchId: sigset.3,v 1.2 1996/04/11 06:39:09 philip Exp $