xref: /original-bsd/lib/libc/sys/sigprocmask.2 (revision 5b560bbe)
Copyright (c) 1983 The Regents of the University of California.
All rights reserved.

%sccs.include.redist.man%

@(#)sigprocmask.2 6.2 (Berkeley) 08/21/90

SIGPROCMASK 2 ""
C 7
NAME
sigprocmask - manipulate current signal mask
SYNOPSIS
 #include <signal.h> 
 sigprocmask(how, set, oset);  int how;  sigset_t *set, *oset; 
 mask = sigmask(signum) 
DESCRIPTION
The sigprocmask function examines and/or the current signal mask (those signals that are blocked from delivery). Signals are blocked if they are members of the current signal mask set.

If set is not null, the action of sigprocmask depends on the value of the parameter how . The signal mask is changed as a function of the specified set and the current mask. The function is specified by how using one of the following values from <signal.h>:

SIG_BLOCK \w'SIG_SETMASK\0\0'u
The new mask is the union of the current mask and the specified set .
SIG_UNBLOCK \w'SIG_SETMASK\0\0'u
The new mask is the intersection of the current mask and the complement of the specified set .
SIG_SETMASK \w'SIG_SETMASK\0\0'u
The current mask is replaced by the specified set .

If oset is not null, the previous value of the signal mask. When set is null, this provides a way to examine the signal mask without changing it.

The system quietly disallows SIGKILL or SIGSTOP to be blocked.

"RETURN VALUE
A 0 value indicated that the call succeeded. A -1 return value indicates an error occurred and errno is set to indicated the reason.
ERRORS
The sigprocmask call will fail and the signal mask will be unchanged if one of the following occurs:

15 [EINVAL] how has a value other than those listed here.

"SEE ALSO"
kill(2), sigaction(2), sigsetops(2), sigsuspend(2)