int sigwait(const sigset_t *set,
The sigwait() function
selects a pending signal from set, atomically clears it
from the system's set of pending signals, and returns that
signal number in the location referenced by sig. If no
signal in set is pending at the time of the call, the
thread is suspended until one or more becomes pending. The
signals defined by set are blocked at the time of the
call to sigwait(); otherwise the behavior is undefined.
The effect of sigwait() on the signal actions for signals
in set is unspecified.
If more than one thread is
using sigwait() to wait for the same signal, no more than
one of these threads returns from sigwait() with the
signal number. Which thread returns from sigwait() if more
than a single thread is waiting is unspecified.
Should any of the multiple pending signals be in the range
SIGRTMIN to SIGRTMAX, the lowest numbered one is
The selection order between realtime and non-realtime signals is unspecified.
Specifies the set of
signals to wait for.
Is the address into which the signal number of the received signal is stored.
sigwait() stores the signal number of the received signal
in the location specified by sig and returns 0. On failure, it returns
-1 and sets errno to one of the following values:
sig or set are an
The set argument contains an
invalid or unsupported signal number.
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
- pause(), sigaction(), signal(), sigpause(), sigpending(), sigwaitinfo()
PTC MKS Toolkit 10.3 Documentation Build 39.