use isinf(3) and isnan(3) instead of rolling our own
[unix-history] / usr / src / lib / libc / sys / sigsuspend.2
CommitLineData
931b8415 1.\" Copyright (c) 1983, 1991 The Regents of the University of California.
87714767
MK
2.\" All rights reserved.
3.\"
4.\" %sccs.include.redist.man%
5.\"
931b8415 6.\" @(#)sigsuspend.2 6.2 (Berkeley) %G%
87714767 7.\"
931b8415
CL
8.Dd
9.Dt SIGSUSPEND 2
10.Os BSD 4.4
11.Sh NAME
12.Nm sigsuspend
13.Nd atomically release blocked signals and wait for interrupt
14.Sh SYNOPSIS
15.Fd #include <sys/signal.h>
16.Ft int
17.Fn sigsuspend "const sigset_t *sigmask"
18.Sh DESCRIPTION
19.Fn Sigsuspend
87714767 20temporarily changes the blocked signal mask to the set to which
931b8415 21.Fa sigmask
87714767
MK
22points,
23and then waits for a signal to arrive;
24on return the previous set of masked signals is restored.
25The signal mask set
26is usually empty to indicate that all
27signals are to be unblocked for the duration of the call.
931b8415 28.Pp
87714767 29In normal usage, a signal is blocked using
931b8415 30.Xr sigprocmask 2
87714767
MK
31to begin a critical section, variables modified on the occurrence
32of the signal are examined to determine that there is no work
33to be done, and the process pauses awaiting work by using
931b8415 34.Fn sigsuspend
87714767 35with the previous mask returned by
931b8415
CL
36.Xr sigprocmask .
37.Sh RETURN VALUES
38The
39.Fn sigsuspend
40function
41always terminates by being interrupted, returning -1 with
42.Va errno
43set to
44.Dv EINTR .
45.Sh SEE ALSO
46.Xr sigprocmask 2 ,
47.Xr sigaction 2 ,
48.Xr sigsetops 3
49.Sh STANDARDS
50The
51.Fn sigsupend
52function call
53conforms to IEEE Std 1003.1-1988
54.Pq Dq Tn POSIX .