Switch to SpeakEasy.net DSL

The Modular Manual Browser

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

SIGPAUSE(2V)                                                      SIGPAUSE(2V)

       sigpause,  sigsuspend  - automatically release blocked signals and wait
       for interrupt

       int sigpause(sigmask)
       int sigmask;

       #include <&lt;signal.h>&gt;

       int sigsuspend(sigmaskp)
       sigset_t *sigmaskp;

       sigpause() assigns sigmask to the set of masked signals and then  waits
       for  a  signal  to  arrive;  on  return  the  set  of masked signals is
       restored.  sigmask is usually 0 to indicate that no signals are now  to
       be blocked.  sigpause() always terminates by being interrupted, return-
       ing EINTR.

       In normal usage, a signal is blocked  using  sigblock(2),  to  begin  a
       critical  section,  variables  modified on the occurrence of the signal
       are examined to determine that there is no work to  be  done,  and  the
       process pauses awaiting work by using sigpause() with the mask returned
       by sigblock().

       sigsuspend() replaces the process's signal mask with the set of signals
       pointed  to by sigmaskp and then suspends the process until delivery of
       a signal whose action is either to execute a  signal-catching  function
       or  to  terminate  the  process.   If  the  action  is to terminate the
       process, sigsuspend() does not return.  If the action is to  execute  a
       signal-catching  function, sigsuspend() returns after the signal-catch-
       ing function returns, with the signal mask restored to the setting that
       existed  prior  to  the sigsuspend() call.  It is not possible to block
       those signals that cannot be ignored, as documented in <&lt;signal.h>&gt;  this
       is enforced by the system without indicating an error.

       Since  sigpause()  and  sigsuspend()  suspend process execution indefi-
       nitely, there is no successful completion return  value.   On  failure,
       these functions return -1 and set errno to indicate the error.

       EINTR          A signal is caught by the calling process and control is
                      returned from the signal-catching function.

       sigblock(2),  sigpending(2V),  sigprocmask(2V),  sigvec(2),  pause(3V),
       sigaction(3V), signal(3V), sigsetops(3V)

                                21 January 1990                   SIGPAUSE(2V)