.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)sigblock.2 1.26 90/02/15 SMI; from UCB 6.3 5/14/86
.TH SIGBLOCK 2 "21 January 1990"
.SH NAME
sigblock, sigmask \- block signals
.SH SYNOPSIS
.LP
.nf
.ft B
#include <signal.h>
.ft
.fi
.LP
.nf
.ft B
int sigblock(mask);
int mask;
.ft
.fi
.LP
.nf
.ft B
int sigmask(signum)
.ft
.fi
.SH DESCRIPTION
.IX  sigblock()  ""  "\fLsigblock()\fP \(em block signals"
.IX  signals  sigblock()  ""  \fLsigblock()\fP
.IX  "block signals"
.LP
.B sigblock(\|)
adds the signals specified in
.I mask
to the set of signals currently being blocked from delivery.
A signal is
blocked if the appropriate bit in
.I mask
is set.
The macro
.B sigmask(\|)
is provided to construct the signal mask for a given
.IR signum .
.B sigblock(\|)
returns the previous signal mask, which may be restored using
.BR sigsetmask (2).
.LP
It is not possible to block
.SB SIGKILL
or
.BR \s-1SIGSTOP\s0 .
The system silently imposes this restriction.
.SH RETURN VALUES
.LP
.B sigblock(\|)
returns
the previous signal mask.
.LP
The
.B sigmask(\|)
macro
returns the mask for the given signal number.
.SH SEE ALSO
.BR kill (2V),
.BR sigsetmask (2),
.BR sigvec (2),
.BR signal (3V)
