'\"macro stdmacro
.if n .pH g2.sigpause @(#)sigpause	40.8 of 9/18/89
.\" Copyright (c) 1980 Regents of the University of California.
.\" Copyright (c) 1988 Sun Microsystems, Inc. - All Rights Reserved.
.\"
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.nr X
.if \nX=0 .ds x} sigpause 3 "BSD Compatibility Package" "\&"
.if \nX=1 .ds x} sigpause 3 "BSD Compatibility Package"
.if \nX=2 .ds x} sigpause 3 "" "\&"
.if \nX=3 .ds x} sigpause "" "" "\&"
.TH \*(x}
.SH NAME
\f4sigpause\f1 \- automically release blocked signals and wait for interrupt
.SH SYNOPSIS
\f4cc \f1[ \f2flag\f1... ] \f2file\f1 ... \f4\-lucb\f1
.P
\f4sigpause(sigmask)\f1
.br
\f4int sigmask;\f1
.ft 1
.SH DESCRIPTION
\f4sigpause\f1
assigns
.I sigmask
to the set of masked signals
and then waits for a signal to arrive;
on return the set of masked signals is restored.
.I sigmask
is usually 0 to indicate that no
signals are now to be blocked.
\f4sigpause\f1
always terminates by being interrupted, returning
\f4EINTR\fP.
.P
In normal usage, a signal is blocked using
\f4sigblock\f1(3),
to begin a critical section, variables modified on the occurrence
of the signal are examined to determine that there is no work
to be done, and the process pauses awaiting work by using
\f4sigpause\f1
with the mask returned by
\f4sigblock\fP.
.SH SEE ALSO
\f4sigblock\fP(3),
\f4sigvec\fP(3),
\f4signal\fP(3)
.P
\f4signal\fP(2),
\f4sigaction\fP(2)
in the \f2Programmer's Reference Manual\f1.
