sigprocmask(2P) INTERACTIVE UNIX System (POSIX) sigprocmask(2P)
NAME
sigprocmask - examine and change blocked signals
SYNOPSIS
int sigprocmask (how, set, oset)
int how;
sigset_t *set, *oset;
DESCRIPTION
The sigprocmask() function is used to examine and/or change
the calling process's signal mask. If the value of the
argument set is not NULL, it points to a set of signals to
be used to change the currently blocked set.
The value of how indicates the manner in which the set is
changed and consists of one of the following values,
SIG_BLOCK, SIG_UNBLOCK, or ISG_SETMASK. SIG_BLOCK is used
to modify the current set to be the union of the current set
and the signal set pointed to by the argument set.
SIG_UNBLOCK is used to modify the current set to be the
intersection of the current set and the signal set pointed
to by the argument set. ISG_SETMASK is used to set the
current set to be the signal set pointed to by the argument
set.
If the argument oset is not NULL, the previous mask is
stored in the space pointed to by oset. If the value of the
argument set is NULL, the value of the argument how is not
significant and the process's signal mask is unchanged by
this function call; thus the call can be used to inquire
about currently blocked signals.
It is not possible to block the SIGKILL and SIGSTOP signals;
this is enforced by the system without causing an error to
be indicated.
If the sigprocmask() function fails, the process's signal
mask is not changed by this function call.
DIAGNOSTICS
After successful completion, a value of 0 is returned. Oth-
erwise, a value of -1 is returned, and errno is set to indi-
cate the error. If the how argument is set to a value other
than one of those defined, errno is set to EINVAL.
Rev. 1.1 Page 1