summaryrefslogtreecommitdiff
path: root/usr/src/man/man3ucb/sigblock.3ucb
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/man/man3ucb/sigblock.3ucb')
-rw-r--r--usr/src/man/man3ucb/sigblock.3ucb81
1 files changed, 81 insertions, 0 deletions
diff --git a/usr/src/man/man3ucb/sigblock.3ucb b/usr/src/man/man3ucb/sigblock.3ucb
new file mode 100644
index 0000000000..41b93589bd
--- /dev/null
+++ b/usr/src/man/man3ucb/sigblock.3ucb
@@ -0,0 +1,81 @@
+'\" te
+.\" Copyright (c) 2007 Sun Microsystems, Inc. All Rights Reserved.
+.\" Copyright (c) 1983 Regents of the University of California. All rights reserved. The Berkeley software License Agreement specifies the terms and conditions for redistribution.
+.TH sigblock 3UCB "30 Oct 2007" "SunOS 5.11" "SunOS/BSD Compatibility Library Functions"
+.SH NAME
+sigblock, sigmask, sigpause, sigsetmask \- block signals
+.SH SYNOPSIS
+.LP
+.nf
+\fB/usr/ucb/cc\fR [ \fIflag\fR ... ] \fIfile\fR ...
+#include <signal.h>
+
+\fBint\fR \fBsigblock\fR(\fImask\fR)
+\fBint\fR \fImask\fR;
+.fi
+
+.LP
+.nf
+\fBint\fR \fBsigmask\fR(\fIsignum\fR)
+\fBint\fR \fIsignum\fR;
+.fi
+
+.LP
+.nf
+\fBint\fR \fBsigpause\fR(\fImask\fR)
+\fBint\fR \fImask\fR;
+.fi
+
+.LP
+.nf
+\fBint\fR \fBsigsetmask\fR(\fImask\fR)
+\fBint\fR \fImask\fR;
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+\fBsigblock()\fR adds the signals specified in \fImask\fR to the set of signals
+currently being blocked from delivery. Signals are blocked if the appropriate
+bit in \fImask\fR is a 1; the macro \fBsigmask\fR is provided to construct the
+mask for a given \fIsignum\fR. \fBsigblock()\fR returns the previous mask. The
+previous mask may be restored using \fBsigsetmask()\fR.
+.sp
+.LP
+\fBsigpause()\fR assigns \fImask\fR to the set of masked signals and then waits
+for a signal to arrive; on return the set of masked signals is restored.
+\fImask\fR is usually 0 to indicate that no signals are now to be blocked.
+\fBsigpause()\fR always terminates by being interrupted, returning \(mi1 and
+setting \fBerrno\fR to \fBEINTR.\fR
+.sp
+.LP
+\fBsigsetmask()\fR sets the current signal mask (those signals that are blocked
+from delivery). Signals are blocked if the corresponding bit in \fImask\fR is
+a 1; the macro \fBsigmask\fR is provided to construct the mask for a given
+\fIsignum\fR.
+.sp
+.LP
+In normal usage, a signal is blocked using \fBsigblock()\fR. To begin a
+critical section, variables modified on the occurrence of the signal are
+examined to determine that there is no work to be done, and the process pauses
+awaiting work by using \fBsigpause()\fR with the mask returned by
+\fBsigblock()\fR.
+.sp
+.LP
+It is not possible to block \fBSIGKILL\fR, \fBSIGSTOP\fR, or \fBSIGCONT\fR,
+this restriction is silently imposed by the system.
+.SH RETURN VALUES
+.sp
+.LP
+\fBsigblock()\fR and \fBsigsetmask()\fR return the previous set of masked
+signals. \fBsigpause()\fR returns \(mi1 and sets \fBerrno\fR to \fBEINTR\fR.
+.SH SEE ALSO
+.sp
+.LP
+\fBkill\fR(2), \fBsigaction\fR(2), \fBsignal\fR(3UCB), \fBsigvec\fR(3UCB)
+.SH NOTES
+.sp
+.LP
+Use of these interfaces should be restricted to only applications written on
+BSD platforms. Use of these interfaces with any of the system libraries or in
+multi-thread applications is unsupported.