Section: Linux Programmer's Manual (2)
Return to Main Contents
sigprocmask - examine and change blocked signals
int sigprocmask(int how, const sigset_t *set,
Feature Test Macro Requirements for glibc (see
_POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _POSIX_SOURCE
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.
This page is part of release 3.27 of the Linux
A description of the project,
and information about reporting bugs,
can be found at
- RETURN VALUE
- CONFORMING TO
- SEE ALSO
This document was created by
using the manual pages.