NAME
sigpause - Provides a compatibility interface to the sig-
suspend function
LIBRARY
Standard C Library (libc.a)
SYNOPSIS
#include <signal.h>
int sigpause (
int signal_mask );
PARAMETERS
signal_mask
Specifies which signals to block.
DESCRIPTION
The sigpause() function call blocks the signals specified by
the signal_mask parameter and then suspends execution of the
process until delivery of a signal whose action is either to
execute a signal-catching function or to end the process.
Signal of value i is blocked if the i-th bit of the mask is
set. Only signals with values 1 to 31 can be blocked with
the sigpause() function. In addition, the sigpause() func-
tion does not allow the SIGKILL, SIGSTOP, or SIGCONT signals
to be blocked. If a program attempts to block one of these
signals, the sigpause() function gives no indication of the
error.
The sigpause() function sets the signal mask and waits for
an unblocked signal as one atomic operation. This means that
signals cannot occur between the operations of setting the
mask and waiting for a signal.
The sigpause() function is provided for compatibility with
older UNIX systems; its function is a subset of the sig-
suspend() function.
RETURN VALUES
If a signal is caught by the calling process and control is
returned from the signal handler, the calling process
resumes execution after the sigpause() function, which
always returns a value of -1 and sets errno to [EINTR].
If delivery of a signal causes the process to end, the sig-
pause() function does not return.
If delivery of a signal causes a signal-catching function to
execute, the sigpause() function returns after the signal-
catching function returns, with the signal mask restored to
the set that existed prior to the sigpause() call.
RELATED INFORMATION
Functions: pause(3), sigaction(2), sigblock(2),
sigprocmask(2), sigsuspend(2), sigvec(2)
Acknowledgement and Disclaimer