COHERENT manpages

This page displays the COHERENT manpage for sigprocmask() [Examine or change the signal mask].

List of available manpages
Index


sigprocmask() -- System Call (libc)

Examine or change the signal mask
#include <signal.h>
int sigprocmask(how, set, old_set)
int how; const sigset_t *set; sigset_t *old_set;

sigprocmask() examines or changes the calling process's signal mask.

how defines how to modify the mask, as follows:

SIG_BLOCK
     Add to the signal mask the set of signals to which set points.

SIG_UNBLOCK
     Remove from the signal mask the set of signals to which set points.

SIG_SETMASK
     Replace the current  signal mask with the set of  signals to which set
     points.  If old_set is not  NULL, sigprocmask() stores the old mask in
     the space to which it points.

If set is  NULL, sigprocmask() ignores the value of  how; thus, you can use
the call to find which signals are in the signal mask.

If   any  unblocked   unblocked  signals   are   pending  after   you  call
sigprocmask(),  at least  one  of those  signals will  be delivered  before
sigprocmask() returns.

If all goes well,  sigprocmask() returns zero.  sigprocmask() returns -1 if
either of the following conditions is true:

-> how  is not  set to  a  recognized value.   sigprocmask() sets  errno to
   EINVAL.

-> set  or old_set  points outside the  process's allocated  address space.
   sigprocmask() sets errno to EFAULT.

In either error condition, sigprocmask() does not change the signal mask.

See Also

libc,
signal(),
siglongjmp(),
sigsetjmp()
POSIX Standard, §3.3.5