.\" 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 .\" .TH SIGPROCMASK 2 "" .UC 7 .SH NAME sigprocmask \- manipulate current signal mask .SH SYNOPSIS .nf .B #include .B sigprocmask(how, set, oset); .B int how; .B sigset_t *set, *oset; .B mask = sigmask(signum) .SH DESCRIPTION The .I 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. .PP If .I set is not null, the action of .I sigprocmask depends on the value of the parameter .IR how . The signal mask is changed as a function of the specified .I set and the current mask. The function is specified by .I how using one of the following values from : .IP SIG_BLOCK \w'SIG_SETMASK\0\0'u The new mask is the union of the current mask and the specified .IR set . .IP SIG_UNBLOCK \w'SIG_SETMASK\0\0'u The new mask is the intersection of the current mask and the complement of the specified .IR set . .IP SIG_SETMASK \w'SIG_SETMASK\0\0'u The current mask is replaced by the specified .IR set . .PP If .I oset is not null, the previous value of the signal mask. When .I set is null, this provides a way to examine the signal mask without changing it. .PP The system quietly disallows SIGKILL or SIGSTOP to be blocked. .SH "RETURN VALUE A 0 value indicated that the call succeeded. A \-1 return value indicates an error occurred and .I errno is set to indicated the reason. .SH ERRORS The .I sigprocmask call will fail and the signal mask will be unchanged if one of the following occurs: .TP 15 [EINVAL] .I how has a value other than those listed here. .SH "SEE ALSO" kill(2), sigaction(2), sigsetops(2), sigsuspend(2)