sigsuspend, rt_sigsuspend - wait for a signal
#include <signal.h>
int sigsuspend(const sigset_t *mask);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
sigsuspend() temporarily replaces the signal mask of
the calling thread with the mask given by mask
and then
suspends the thread until delivery of a signal whose action is to invoke
a signal handler or to terminate a process.
If the signal terminates the process, then sigsuspend() does not return. If the signal is caught, then sigsuspend() returns after the signal handler returns, and the signal mask is restored to the state before the call to sigsuspend().
It is not possible to block SIGKILL or
SIGSTOP; specifying these signals in mask
, has
no effect on the thread's signal mask.
sigsuspend() always returns -1, with errno
set to indicate the error (normally, EINTR).
kill(2), pause(2), sigaction(2), signal(2), sigprocmask(2), sigwaitinfo(2), sigsetops(3), sigwait(3), signal(7)