Other Aliassighold, sigignore, sigpause, sigrelse
SYNOPSISIn signal.h Ft int Fn sighold int sig Ft int Fn sigignore int sig Ft int Fn xsi_sigpause int sigmask Ft int Fn sigrelse int sig Ft void (*)(int) Fn sigset int void (*disp)(int) Ft int Fn sigpause int sigmask
DESCRIPTIONThis interface is made obsolete by sigsuspend(2) and sigaction(2).
The Fn sigset function modifies signal dispositions. The Fa sig argument specifies the signal, which may be any signal except SIGKILL and SIGSTOP The Fa disp argument specifies the signal's disposition, which may be SIG_DFL SIG_IGN or the address of a signal handler. If Fn sigset is used, and Fa disp is the address of a signal handler, the system adds Fa sig to the signal mask of the calling process before executing the signal handler; when the signal handler returns, the system restores the signal mask of the calling process to its state prior to the delivery of the signal. In addition, if Fn sigset is used, and Fa disp is equal to SIG_HOLD Fa sig is added to the signal mask of the calling process and Fa sig 's disposition remains unchanged. If Fn sigset is used, and Fa disp is not equal to SIG_HOLD Fa sig is removed from the signal mask of the calling process.
The Fn sighold function adds Fa sig to the signal mask of the calling process.
The Fn sigrelse function removes Fa sig from the signal mask of the calling process.
The Fn sigignore function sets the disposition of Fa sig to SIG_IGN
The Fn xsi_sigpause function removes Fa sig from the signal mask of the calling process and suspend the calling process until a signal is received. The Fn xsi_sigpause function restores the signal mask of the process to its original state before returning.
The Fn sigpause function assigns Fa sigmask to the set of masked signals and then waits for a signal to arrive; on return the set of masked signals is restored. The Fa sigmask argument is usually 0 to indicate that no signals are to be blocked.
RETURN VALUESThe Fn sigpause and Fn xsi_sigpause functions always terminate by being interrupted, returning -1 with errno set to Er EINTR .
Upon successful completion, Fn sigset returns SIG_HOLD if the signal had been blocked and the signal's previous disposition if it had not been blocked. Otherwise, SIG_ERR is returned and errno set to indicate the error.
For all other functions, upon successful completion, 0 is returned. Otherwise, -1 is returned and errno is set to indicate the error:
- Bq Er EINVAL
- The Fa sig argument is not a valid signal number.
- Bq Er EINVAL
- For Fn sigset and Fn sigignore functions, an attempt was made to catch or ignore SIGKILL or SIGSTOP
STANDARDSThe Fn sigpause function is implemented for compatibility with historic BSD 4.3 applications. An incompatible interface by the same name, which used a single signal number rather than a mask, was present in AT&T System V , and was copied from there into the X/Open System Interfaces (XSI ) option of St -p1003.1-2001 . Fx implements it under the name Fn xsi_sigpause . The Fn sighold , Fn sigignore , Fn sigrelse and Fn sigset functions are implemented for compatibility with System V and XSI interfaces.
HISTORYThe Fn sigpause function appeared in BSD 4.2 and has been deprecated. All other functions appeared in Fx 8.1 and were deprecated before being implemented.