is used to fetch and/or change the signal mask of the calling thread.
The signal mask is the set of signals whose delivery is currently
blocked for the caller
for more details).
The behavior of the call is dependent on the value of
The set of blocked signals is the union of the current set and the
The signals in
are removed from the current set of blocked signals.
It is permissible to attempt to unblock a signal which is not blocked.
The set of blocked signals is set to the argument
is non-NULL, the previous value of the signal mask is stored in
is NULL, then the signal mask is unchanged (i.e.,
but the current value of the signal mask is nevertheless returned in
(if it is not NULL).
The use of
is unspecified in a multithreaded process; see
returns 0 on success and -1 on error.
The value specified in
It is not possible to block
SIGKILL or SIGSTOP.
Attempts to do so are silently ignored.
Each of the threads in a process has its own signal mask.
A child created via
inherits a copy of its parent's signal mask;
the signal mask is preserved across
while they are blocked, the result is undefined,
unless the signal was generated by
for details on manipulating signal sets.