SIGPAUSE(2) — HP-UX
NAME
sigpause − atomically release blocked signals and wait for interrupt
SYNOPSIS
#include <signal.h>
long sigpause(mask)
long mask;
DESCRIPTION
Sigpause blocks signals according to the value of mask in the same manner as sigsetmask(2), then atomically waits for an unmasked signal to arrive. On return sigpause restores the current signal mask to the value that existed before the sigpause call. When no signals are to be blocked, a value of 0L is used for mask.
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.
RETURN VALUE
Sigpause will terminate when it is interrupted by a signal. When sigpause terminates, it will return −l and set errno to EINTR.
EXAMPLES
The following call to sigpause waits until the calling process receives a signal:
sigpause (0L);
The following example blocks the SIGIO signal until sigpause is called. When a signal is received at the sigpause statement, the signal mask is restored to its value before sigpause was called:
long savemask;
savemask = sigblock (sigmask (SIGIO));
/* critical section */
sigpause (savemask);
WARNINGS
Check all references to signal(2) for appropriateness on systems that support sigvector(2). Sigvector(2) can affect the behavior described on this page.
AUTHOR
Sigpause was developed by the University of California, Berkeley California, Computer Science Division, Department of Electrical Engineering and Computer Science.
SEE ALSO
sigblock(2), sigsetmask(2), sigvector(2).
Hewlett-Packard Company — May 11, 2021