SIGSUSPEND(2P)SIGSUSPEND(2P)NAMEsigsuspend - (POSIX only) suspend the process until delivery of a
specified signal.
SYNOPSIS
#include <signal.h>
sigsuspend(const sigset_t *sigmask);
DESCRIPTION
The information in this specification applies only to POSIX
applications.
The sigsuspend function replaces the signal mask of the process with
the set of signals pointed to by the argument sigmask and then suspends
the process until delivery of a signal whose action is either to
execute a signal-catching function or to terminate the process.
If the action is to terminate the process, sigsuspend does not return.
If the action is to execute a signal-catching function, sigsuspend
returns after the signal-catching function returns, with the signal
mask restored to the set that existed prior to the sigsuspend call.
RETURN VALUE
Since sigsuspend suspends process execution indefinitely, there is no
successful completion return value. A value of -1 is returned and
errno is set to indicate the error.
ERRORS
[EINTR] A signal is caught by the calling process, and control
is returned from the signal-catching function.
SEE ALSOpause(3), sigaction(2P), sigpending(2P), sigprocmask(2P), sigsetops(3)4th Berkeley Distribution August 1, 1992 SIGSUSPEND(2P)