sigwait(3) — Subroutines
OSF
NAME
sigwait − Suspends a calling thread
LIBRARY
Threads Library (libpthreads.a)
SYNOPSIS
#include <signal.h>
int sigwait(
sigset_t ∗set);
PARAMETERS
setSpecifies the set of signals to wait for.
DESCRIPTION
The sigwait() function suspends the calling thread until at least one of the signals in the set parameter is in the threads set of pending signals. When this happens, one of those signals is atomically chosen and removed from the set of pending signals and that signal number is returned.
The effect is unspecified if any signals in the set parameter are not blocked when the sigwait() function is called.
The set parameter is created using the set manipulation functions sigemptyset(), sigfillset(), sigaddset(), and sigdelset().
RETURN VALUES
Upon successful completion, the signal number of the pending signal is returned. Otherwise, -1 is returned and errno is set to indicate the error.
ERRORS
If the sigwait() function fails, errno may be set to the following value:
[EINVAL]The value of the set parameter contains an invalid or unsupported signal number.
RELATED INFORMATION
Functions: sigaction(2), sigpending(2), sigsuspend(2)