![]() |
![]() |
![]() |
Suspend a process until a signal is received
#include <sys/neutrino.h> int SignalSuspend( const sigset_t* set ); int SignalSuspend_r( const sigset_t* set );
libc
The SignalSuspend() and SignalSuspend_r() functions are identical except in the way they indicate errors. See the Returns section for details.
These kernel calls replace the thread's signal mask with the set of signals pointed to by set and then suspends the process until delivery of a signal whose action is either to execute a signal-catching function (then return), or to terminate the process. On return, the previous signal mask is restored.
Attempts to block SIGKILL or SIGSTOP are ignored. This is done without causing an error.
If you're using SignalSuspend() to synchronously wait for a signal, consider using the more efficient POSIX 1003.1b realtime SignalWaitinfo() call.
The only difference between these functions is the way they indicate errors.
Since SignalSuspend() and SignalSuspend_r() block until interrupted, there's no successful return value.
If the signal handler calls longjmp() or siglongjmp(), these functions don't return.
Safety: | |
---|---|
Cancellation point | Yes |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
![]() |
![]() |
![]() |