sighold(), sigignore(), sigpause(), sigrelse(), sigset() - System V signal management routines
#include <signal.h>
int sighold(int signum)
int sigignore(int signum)
int sigpause(int signum)
int sigrelse(int signum)
void (*sigset(int signum, void (*handler)(int)))(int);
These functions provide a simplified form of signal management; they are implemented using the sigaction(2) call.
The sigset(2) function modifies the handling of the signal specified by signum. The signal may be any signal but SIGKILL and SIGSTOP. The handler is SIG_DFL (default), SIG_IGN (ignore), SIG_HOLD (block signal), or a pointer to a handler function. If handler points to a signal handler, signum is added to the calling process' signal mask before executing the handler. When the handler returns, the system restores the signal mask to its previous state. If the handler is SIG_HOLD, sigset(2) adds the signal to the process' signal mask but doesn't change how the signal is handled. If the handler is SIG_DFL or SIG_IGN, the signal is removed from the signal mask.
The sighold(2) function adds signum to the calling process' signal mask.
The sigrelse(2) function removes signum from the calling process' signal mask.
The sigignore(2) function sets the disposition of signum to SIG_IGN.
The sigpause(2) function removes the signal signum from the process' signal mask and then suspends the process until a signal is received.
On success, sigset(2) returns the signal's previous disposition if the signal is not currently blocked. It returns SIG_HOLD if the signal is blocked. On failure, it returns SIG_ERR and sets errno to indicate the error.
The sigpause(2) function suspends execution of the process until a signal is received; then it returns -1 and sets errno to [EINTR].
The other functions return 0 on success. On failure, they return -1 and set errno to indicate the error.
The functions can fail if:
The sigset(2) and sigignore(2) calls will also fail if:
This implementation of sigpause(2) follows the behavior described in the Single UNIX Specification, not BSD practice.
sigaction(2)
signal(2)