SIGPAUSE(2) System Calls SIGPAUSE(2)
sigpause - suspend process until a signal arrives
int sigpause(long int mask);
sigpause suspends execution of the calling process until a signal
arrives. The mask parameter is assigned to the set of blocked signals
(see sigsetmask(2)), and then the process is paused. When a signal
arrives, the regular signal handler (if any) is executed, and then the
original signal mask is restored before returning to the caller. Usu-
ally mask is zero to pause until any signal arrives.
sigpause is normally used in situations where one must protect a criti-
cal section. A typical use begins with sigblock to block a signal (and
enable mutual exclusion); variables modified on the occurance of that
signal are then manipulated, code is executed, etc. To end the criti-
cal section and wait for more work, sigpause is called.
sigpause always returns an error (-1) and sets errno to EINTR.
signal(2), sigblock(2), sigsetmask(2)
GNO 19 January 1997 SIGPAUSE(2)
Man(1) output converted with