SIGSUSPEND(S) UNIX System V SIGSUSPEND(S)
Name
sigsuspend - wait for signal
Syntax
#include <signal.h>
int sigsuspend (sigmask)
sigset_t *sigmask ;
Description
The sigsuspend() function replaces the process's signal mask
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 processs, the sigsuspend()
function does not return. If the action is to execute a
signal-catching function, the sigsuspend() returns after the
signal-catching function returns, with the signal mask
restored to the set that existed prior to the sigsuspend()
call.
It is not possible to block those signals that cannot be
ignored (see signal(S); this is enforced by the system
without causing an error to be indicated.
Return Value
Since the sigsuspend() function suspends process execution
indefinitely, there is no successful completion value
returned. A value of -1 is returned and errno is set to
indicate the error.
Diagnostics
If any of the following conditions occur, the sigsuspend()
function returns -1 and sets errno to the corresponding
value:
[EINTR] A signal is caught by the calling process and
control is returned from the signal-catching
function.
See Also
pause(S), sigaction(S), signal(S), sigpending(S),
sigprocmask(S), sigset(S)
Standards Conformance
sigsuspend is conformant with:
IEEE POSIX Std 1003.1-1988 with C Standard Language-
Dependent System Support;
and NIST FIPS 151-1.
(printed 6/20/89)