sigwait(2)
NAME
sigwait − wait until a signal is posted
SYNOPSIS
#include <signal.h>
int sigwait(sigset_t ∗set);
DESCRIPTION
sigwait() selects a signal in set that is pending on the calling thread (see thr_create(3T)) or LWP. If no signal in set is pending, then sigwait() blocks until a signal in set becomes pending. The selected signal is cleared from the set of signals pending on the calling thread or LWP and the number of the signal is returned. The selection of a signal in set is independent of the signal mask of the calling thread or LWP.
If more than one thread or LWP waits for the same signal, only one is unblocked when the signal arrives.
RETURN VALUES
Upon successful completion, a signal number is returned. Otherwise, a value of −1 is returned and errno is set to indicate error.
ERRORS
If any of the following conditions are detected, sigwait() fails and returns the corresponding value:
EINVAL set contains an unsupported signal number.
EFAULT set points to an invalid address.
SEE ALSO
sigaction(2), sigprocmask(2), thr_sigsetmask(3T), sigpending(2), sigsuspend(2), signal(5).
SunOS 5.2 — Last change: 30 Jul 1992