|SIGWAIT(3)||Library Functions Manual||SIGWAIT(3)|
sigset_t *set, int
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 prior to the call to
sigwait() there are multiple pending instances of a single signal number, it is undefined whether upon successful return there are any remaining pending signals for that signal number. If no signal in set is pending at the time of the call, the thread shall be suspended until one or more becomes pending. The signals defined by set should have been blocked at the time of the call to
sigwait(); otherwise the behaviour is undefined. The effect of
sigwait() on the signal actions for the signals in set is unspecified.
If more than one thread is using
to wait for the same signal, no more than one of these threads shall return
sigwait() with the signal number. Which thread
sigwait() if more than a single thread
is waiting is unspecified.
sigwait() stores the signal number of the received signal at the location referenced by sig and returns zero.
sigwait() returns one of these error values:
sigwait() conforms to ISO/IEC 9945-1:1996 (“POSIX.1”).
|January 13, 2019||OpenBSD-current|