Node:Process Signal Mask, Next:Testing for Delivery, Previous:Signal Sets, Up:Blocking Signals
The collection of signals that are currently blocked is called the signal mask. Each process has its own signal mask. When you create a new process (see Creating a Process), it inherits its parent's mask. You can block or unblock signals with total flexibility by modifying the signal mask.
The prototype for the sigprocmask
function is in signal.h
.
int sigprocmask (int how, const sigset_t *restrict set, sigset_t *restrict oldset) | Function |
The sigprocmask function is used to examine or change the calling
process's signal mask. The how argument determines how the signal
mask is changed, and must be one of the following values:
The last argument, oldset, is used to return information about the
old process signal mask. If you just want to change the mask without
looking at it, pass a null pointer as the oldset argument.
Similarly, if you want to know what's in the mask without changing it,
pass a null pointer for set (in this case the how argument
is not significant). The oldset argument is often used to
remember the previous signal mask in order to restore it later. (Since
the signal mask is inherited over If invoking The
You can't block the Remember, too, that blocking program error signals such as |