System Calls sigsuspend(2)
NAME
sigsuspend - install a signal mask and suspend caller until
signalSYNOPSIS
#include
int sigsuspend(const sigset_t *set);
DESCRIPTION
The sigsuspend() function replaces the caller's signal mask
with the set of signals pointed to by the set argument and suspends the caller until delivery of a signal whose actionis either to execute a signal catching function or to ter-
minate the process. If the set argument points to an invalid address, the behavior is undefined and errno may be set to EFAULT.If the action is to terminate the process, sigsuspend() does
not return. If the action is to execute a signal catchingfunction, sigsuspend() returns after the signal catching
function returns. On return, the signal mask is restored tothe set that existed before the call to sigsuspend().
It is not possible to block signals that cannot be ignored (see signal.h(3HEAD)). This restriction is silently imposed by the system.RETURN VALUES
Since sigsuspend() suspends the caller's execution indefin-
itely, there is no successful completion return value. Onfailure, it returns -1 and sets errno to indicate the error.
ERRORS
The sigsuspend() function will fail if:
EINTR A signal was caught by the caller and control was returned from the signal catching function.The sigsuspend() function may fail if:
EFAULT The set argument points to an illegal address.ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:SunOS 5.11 Last change: 24 Jun 2001 1
System Calls sigsuspend(2)
____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Interface Stability | Committed ||_____________________________|_____________________________|
| MT-Level | Async-Signal-Safe |
|_____________________________|_____________________________|
| Standard | See standards(5). ||_____________________________|_____________________________|
SEE ALSO
sigaction(2), sigprocmask(2), sigwait(2), signal(3C), signal.h(3HEAD), sigsetops(3C), attributes(5) NOTES If the caller specifies more than one unblocked signal inthe mask to sigsuspend(), more than one signal might be pro-
cessed before the call to sigsuspend() returns.
While the caller is executing the signal handler that inter-
rupted its call to sigsuspend(), its signal mask is the one
passed to sigsuspend(), modified as usual by the signal mask
specification in the signal's sigaction(2) parameters. The caller's signal mask is not restored to its previous value until the caller returns from all the signal handlers thatinterrupted sigsuspend().
SunOS 5.11 Last change: 24 Jun 2001 2