Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-5.10)
Apropos / Subsearch:
optional field

sigsuspend(2)                    System Calls                    sigsuspend(2)

       sigsuspend - install a signal mask and suspend caller until signal

       #include <signal.h>

       int sigsuspend(const sigset_t *set);

       The  sigsuspend()  function  replaces the caller's signal mask with the
       set of signals pointed to by the set argument and  suspends the  caller
       until  delivery  of a signal whose action is either to execute a signal
       catching function or to terminate the  process.  If  the  set  argument
       points  to  an invalid address, the behavior is undefined and errno may
       be set to EFAULT.

       If the action is  to  terminate  the  process,  sigsuspend()  does  not
       return.   If  the action is to execute a signal catching function, sig-
       suspend() returns  after  the  signal  catching  function  returns.  On
       return,  the signal mask is restored to the set that existed before the
       call to sigsuspend().

       It is not possible to block signals that cannot be  ignored  (see  sig-
       nal.h(3HEAD)). This restriction is silently imposed by the system.

       Since  sigsuspend() suspends the caller's execution indefinitely, there
       is no successful completion return value. On failure, it returns -1 and
       sets errno to indicate the error.

       The sigsuspend() function will fail if:

       EINTR    A  signal  was  caught  by the caller and control was returned
                from the signal catching function.

       The sigsuspend() function may fail if:

       EFAULT   The set argument points to an illegal address.

       See attributes(5) for descriptions of the following attributes:

       tab()    allbox;    cw(2.750000i)|     cw(2.750000i)     lw(2.750000i)|
       lw(2.750000i).   ATTRIBUTE TYPEATTRIBUTE VALUE Interface StabilityStan-
       dard MT-LevelAsync-Signal-Safe

       sigaction(2), sigprocmask(2), sigwait(2), signal(3C),  signal.h(3HEAD),
       sigsetops(3C), attributes (5)

       If  the  caller specifies more than one unblocked signal in the mask to
       sigsuspend(), more than one signal might be processed before  the  call
       to sigsuspend() returns.

       While  the  caller is executing the signal handler that interrupted its
       call to sigsuspend(), its signal mask is  the  one  passed  to  sigsus-
       pend(),  modified as usual by the signal mask specification in the sig-
       nal's  sigaction(2)  parameters.   The  caller's  signal  mask  is  not
       restored  to  its  previous value until the caller returns from all the
       signal handlers that interrupted sigsuspend().

SunOS 5.10                        24 Jun 2001                    sigsuspend(2)