.\" Copyright (c) 1983 The Regents of the University of California. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms are permitted provided .\" that: (1) source distributions retain this entire copyright notice and .\" comment, and (2) distributions including binaries display the following .\" acknowledgement: ``This product includes software developed by the .\" University of California, Berkeley and its contributors'' in the .\" documentation or other materials provided with the distribution and in .\" all advertising materials mentioning features or use of this software. .\" Neither the name of the University nor the names of its contributors may .\" be used to endorse or promote products derived from this software without .\" specific prior written permission. .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. .\" .\" @(#)sigprocmask.2 6.1 (Berkeley) 7/1/90 .\" .TH SIGPROCMASK 2 "July 1, 1990" .UC 7 .SH NAME sigprocmask \- manipulate current signal mask .SH SYNOPSIS .nf .B #include <signal.h> .B sigprocmask(how, set, oset); .B int how; .B sigset_t *set, *oset; .B mask = sigmask(signum) .SH DESCRIPTION The .I sigsetmask 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 sigsetmask 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 <signal.h>: .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)