sigprocmask(2) sigprocmask(2)
NAME
sigprocmask - change or test signal mask
SYNOPSIS
#include <signal.h>
int sigprocmask(int how, const sigsett *set, const sigsett *oset);
DESCRIPTION
The sigprocmask() function is used to examine and/or change the cal-
ling process' signal mask. If the value is SIGBLOCK, the set pointed
to by the argument set is added to the current signal mask. If the
value is SIGUNBLOCK, the set pointed by the argument set is removed
from the current signal mask. If the value is SIGSETMASK, the current
signal mask is replaced by the 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 how is not significant and the process' signal mask is
unchanged; thus, the call can be used to enquire about currently
blocked signals.
If there are any pending unblocked signals after the call to sigproc-
mask(), at least one of those signals will be delivered before the
call to sigprocmask() returns.
It is not possible to block those signals that cannot be ignored [see
sigaction(2)]; this restriction is silently imposed by the system.
If any of the SIGFPE, SIGKILL or SIGSEGV signals are generated while
they are blocked, the result is undefined, unless the signal was gen-
erated by a call to kill() or raise().
If sigprocmask() fails, the process' signal mask is not changed.
sigprocmask() fails if any of the following are true:
EINVAL The value of the how argument is not equal to one of the
defined values.
EFAULT set or oset points outside the process' allocated address
space.
RESULT
On success, sigprocmask() returns 0. On failure, it returns -1 and
sets errno to indicate the error.
SEE ALSO
sigaction(2), signal(2), sigsetops(3C), signal(5).
Page 1 Reliant UNIX 5.44 Printed 11/98