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