macro and text revision (-mdoc version 3)
[unix-history] / usr / src / lib / libc / gen / sigsetops.3
CommitLineData
ae59e04c 1.\" Copyright (c) 1983, 1991 The Regents of the University of California.
3d5d5b83
MK
2.\" All rights reserved.
3.\"
4.\" %sccs.include.redist.man%
5.\"
ae59e04c 6.\" @(#)sigsetops.3 6.2 (Berkeley) %G%
3d5d5b83 7.\"
ae59e04c
CL
8.Dd
9.Dt SIGSETOPS 3
10.Os
11.Sh NAME
12.Nm sigsetops ,
13.Nm sigemptyset ,
14.Nm sigfillset ,
15.Nm sigaddset ,
16.Nm sigdelset ,
17.Nm sigismember
18.Nd manipulate signal masks
19.Sh SYNOPSIS
20.Fd #include <signal.h>
21.Fn sigemptyset "sigset_t *set"
22.Fn sigfillset "sigset_t *set"
23.Fn sigaddset "sigset_t *set" "int signo"
24.Fn sigdelset "sigset_t *set" "int signo"
25.Fn sigismember "sigset_t *set" "int signo"
26.Sh DESCRIPTION
3d5d5b83 27These functions manipulate signal mask stored in a
ae59e04c 28.Fa sigset_t .
3d5d5b83
MK
29They are provided as macros, but actual functions are available
30if their names are undefined (with #undef
ae59e04c
CL
31.Em name ) .
32.Pp
3d5d5b83 33The
ae59e04c 34.Fn sigemptyset
3d5d5b83
MK
35function initializes a signal set to be empty.
36The
ae59e04c 37.Fn sigfillset
3d5d5b83
MK
38function initializes a signal set to contain all of the known signals.
39One of these routines must be used to initialize a signal set
40before its use by the other functions.
ae59e04c 41.Pp
3d5d5b83 42The
ae59e04c 43.Fn sigaddset
3d5d5b83 44function adds a specified signal
ae59e04c 45.Fa signo
3d5d5b83
MK
46to a signal set.
47The
ae59e04c 48.Fn sigdelset
3d5d5b83 49function deletes a specified signal
ae59e04c 50.Fa signo
3d5d5b83 51from a signal set.
ae59e04c 52.Pp
3d5d5b83 53The
ae59e04c 54.Fn sigismember
3d5d5b83 55function tests whether a specified signal
ae59e04c 56.Fa signo
3d5d5b83 57is contained in a signal set.
ae59e04c 58.Sh RETURN VALUES
3d5d5b83 59The
ae59e04c 60.Fn sigismember
3d5d5b83
MK
61function returnes 1
62if the signal is a member of the set,
63a 0 otherwise.
64The other functions return 0 upon success.
65A \-1 return value
ae59e04c
CL
66indicates an error occurred and the global variable
67.Va errno
3d5d5b83
MK
68is set to indicated the reason.
69The current implementation does not detect any errors.
ae59e04c 70.Sh ERRORS
3d5d5b83 71These functions could fail if one of the following occurs:
ae59e04c
CL
72.Bl -tag -width [EINVAL]
73.It Bq Er EINVAL
74.Fa signo
3d5d5b83 75has an invalid value.
ae59e04c
CL
76.El
77.Sh SEE ALSO
78.Xr kill 2 ,
79.Xr sigaction 2 ,
80.Xr sigsetops 2 ,
81.Xr sigsuspend 2
82.Sh STANDARDS
83The
84These functions are defined by
85.St -p1003.1-88 .
86.Sh HISTORY
87These functions are
88.Ud .