COHERENT manpages

This page displays the COHERENT manpage for sigsuspend() [Install a signal mask and suspend process].

List of available manpages
Index


sigsuspend() -- System Call (libc)

Install a signal mask and suspend process
#include <signal.h>
int sigsuspend(set)
const sigset_t *set;

sigsuspend() replaces the process's signal  mask with the set of signals to
which set  points, then  suspends the current  process until it  receives a
signal  that either  terminates the  process  or invokes  a signal-handling
function.

If  the  received  signal terminates  the  process,  sigsuspend() does  not
return.   If,  however,  the  received  signal  invokes  a  signal-handling
function, sigsuspend() restores the original signal mask.

Because sigsuspend() indefinitely  suspends execution of the process, there
is no return value that indicates successful completion.  If something goes
wrong, it returns -1 and  sets errno to an appropriate value.  sigsuspend()
fails if either of the following is true:

-> The calling process catches a  signal and grabs control from the signal-
   catching function.  sigsuspend() sets errno to EINTR.

-> set points outside  the process's allocated address space.  sigsuspend()
   sets errno to EFAULT.

See Also

libc,
siglongjmp(),
signal(),
sigsetjmp()
POSIX Standard, §3.3.7