sigsuspend(2) — Series 300/400 Only
NAME
sigsuspend − wait for a signal
SYNOPSIS
#include <signal.h>
int sigsuspend(const sigset_t *sigmask);
DESCRIPTION
sigsuspend() replaces the process’s current signal mask with the set of signals pointed to by sigmask, then suspends the process until delivery of a signal that either executes a signal handler or terminates the process.
If the signal terminates the process, sigsuspend() never returns. If the signal executes a signal handler, sigsuspend() returns after the signal handler returns, and restores the signal mask to the set that existed prior to the sigsuspend() call.
It is impossible to block the SIGKILL or SIGSTOP signal. This is enforced by the system without causing an error to be indicated.
RETURN VALUE
Since sigsuspend() suspends a process indefinitely, there is no successful completion return value. If a return occurs, a value of −1 is returned and errno is set to indicate the error.
ERRORS
sigsuspend() fails if any of the following conditions are encountered:
[EINTR] sigsuspend() was interrupted by receipt of a signal.
[EFAULT] sigmask points to an invalid address. The reliable detection of this error is implementation dependent.
AUTHOR
sigsuspend() was derived from the IEEE POSIX 1003.1-1988 Standard.
SEE ALSO
sigaction(2), sigpending(2), sigprocmask(2), sigsetops(3C), signal(5).
STANDARDS CONFORMANCE
sigsuspend(): AES, XPG3, XPG4, FIPS 151-2, POSIX.1
Hewlett-Packard Company — HP-UX Release 9.0: August 1992