date and time created 90/06/23 17:20:37 by trent
[unix-history] / usr / src / lib / libc / compat-43 / sigpause.2
CommitLineData
88b3ccf2
KB
1.\" Copyright (c) 1983 The Regents of the University of California.
2.\" All rights reserved.
9b55b9db 3.\"
88b3ccf2
KB
4.\" Redistribution and use in source and binary forms are permitted
5.\" provided that the above copyright notice and this paragraph are
6.\" duplicated in all such forms and that any documentation,
7.\" advertising materials, and other materials related to such
8.\" distribution and use acknowledge that the software was developed
9.\" by the University of California, Berkeley. The name of the
10.\" University may not be used to endorse or promote products derived
11.\" from this software without specific prior written permission.
12.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
15.\"
16.\" @(#)sigpause.2 6.3 (Berkeley) %G%
9b55b9db 17.\"
4c40fc65 18.TH SIGPAUSE 2 ""
9b55b9db
KM
19.UC 4
20.SH NAME
9d5a8e29 21sigpause \- atomically release blocked signals and wait for interrupt
9b55b9db 22.SH SYNOPSIS
9d5a8e29
KM
23.ft B
24sigpause(sigmask)
25.br
26int sigmask;
27.ft R
9b55b9db 28.SH DESCRIPTION
9d5a8e29
KM
29.I Sigpause
30assigns
31.I sigmask
32to the set of masked signals
33and then waits for a signal to arrive;
34on return the set of masked signals is restored.
35.I Sigmask
36is usually 0 to indicate that no
37signals are now to be blocked.
38.I Sigpause
4c40fc65
KM
39always terminates by being interrupted, returning \-1 with
40.I errno
41set to EINTR.
9d5a8e29
KM
42.PP
43In normal usage, a signal is blocked using
44.IR sigblock (2),
09cfce6f 45to begin a critical section, variables modified on the occurrence
9d5a8e29
KM
46of the signal are examined to determine that there is no work
47to be done, and the process pauses awaiting work by using
48.I sigpause
49with the mask returned by
50.IR sigblock .
9b55b9db 51.SH SEE ALSO
9d5a8e29 52sigblock(2), sigvec(2)