SIGPROCMASK(2-POSIX)RISC/os Reference Manual SIGPROCMASK(2-POSIX)
NAME
sigprocmask - examine and change blocked signals
SYNOPSIS
#include <signal.h>
int sigprocmask(how, set, oset)
int how;
sigsett *set, *oset;
DESCRIPTION
sigprocmask allows the calling process to examine or change
(or both) its signal mask. If set is not NULL, it points to
a set of signals to be used to change the currently blocked
set.
how indicates what effect set has on the signal mask. how
can have one of the following values:
SIGBLOCK The new signal mask is the union of the
current set and the signal set indicated
by set.
SIGUNBLOCK The new signal mask is the intersection
of the current set and the complement of
the signal set indicated by set.
SIGSETMASK The new signal mask is the signal set
indicated by set.
If oset is not NULL, the previous mask is stored at the
location indicated by oset. If set is NULL, how is not sig-
nificant and the process' signal mask is unchanged by the
call. A process can enquire about the currently blocked
signals by setting set to NULL.
If there are any pending unblocked signals after the call to
sigprocmask, at least one of the signals will be delivered
before sigprocmask returns.
SIGKILL and SIGSTOP cannot be blocked. This restriction is
silently enforced.
If any of the SIGFPE, SIGILL, or SIGSEGV signals are gen-
erated while they are blocked, the result is undefined,
unless the signal was generated by a call to kill.
RETURN VALUES
Upon successful completion, 0 is returned. Otherwise, -1 is
returned and errno is set to indicate the error.
Printed 1/15/91 Page 1
SIGPROCMASK(2-POSIX)RISC/os Reference Manual SIGPROCMASK(2-POSIX)
ERRORS
If any of the following conditions occur, sigprocmask
returns -1 and sets errno to the corresponding value:
[EINVAL] how is not one of the defined values.
[EFAULT] set or oset points outside the process'
allocated address space.
If sigprocmask fails, the process' signal mask is not
changed by the call.
SEE ALSO
sigaction(2), sigpending(2), sigsetops(2), sigsuspend(2).
Page 2 Printed 1/15/91