BSD 4_3_Net_2 release
[unix-history] / usr / src / lib / libc / sys / sigprocmask.2
index 88184c9..95f468c 100644 (file)
-.\" Copyright (c) 1983 The Regents of the University of California.
+.\" Copyright (c) 1983, 1991 The Regents of the University of California.
 .\" All rights reserved.
 .\"
 .\" 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.
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\"    must display the following acknowledgement:
+.\"    This product includes software developed by the University of
+.\"    California, Berkeley and its contributors.
+.\" 4. 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.
 .\"
 .\"
-.\"    @(#)sigprocmask.2       6.1 (Berkeley) 7/1/90
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
 .\"
 .\"
-.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
+.\"    @(#)sigprocmask.2       6.4 (Berkeley) 7/23/91
+.\"
+.Dd July 23, 1991
+.Dt SIGPROCMASK 2
+.Os
+.Sh NAME
+.Nm sigprocmask
+.Nd manipulate current signal mask
+.Sh SYNOPSIS
+.Fd #include <signal.h>
+.Ft int
+.Fn sigprocmask "int how" "const sigset_t *set" "sigset_t *oset"
+.Fn sigmask signum
+.Sh DESCRIPTION
 The
 The
-.I sigsetmask
-function examines and/or the current signal mask (those signals
+.Fn sigprocmask
+function examines and/or changes the current signal mask (those signals
 that are blocked from delivery).
 Signals are blocked if they are members of the current signal mask set.
 that are blocked from delivery).
 Signals are blocked if they are members of the current signal mask set.
-.PP
+.Pp
 If
 If
-.I set
+.Fa set
 is not null, the action of
 is not null, the action of
-.I sigsetmask
+.Fn sigprocmask
 depends on the value of the parameter
 depends on the value of the parameter
-.IR how .
+.Fa how .
 The signal mask is changed as a function of the specified
 The signal mask is changed as a function of the specified
-.I set
+.Fa set
 and the current mask.
 The function is specified by
 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
+.Fa how
+using one of the following values from
+.Aq Pa signal.h :
+.Bl -tag -width SIG_UNBLOCK
+.It Dv SIG_BLOCK
 The new mask is the union of the current mask and the specified
 The new mask is the union of the current mask and the specified
-.IR set .
-.IP SIG_UNBLOCK \w'SIG_SETMASK\0\0'u
+.Fa set .
+.It Dv SIG_UNBLOCK
 The new mask is the intersection of the current mask
 and the complement of the specified
 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
+.Fa set .
+.It Dv SIG_SETMASK
 The current mask is replaced by the specified
 The current mask is replaced by the specified
-.IR set .
-.PP
+.Fa set .
+.El
+.Pp
 If
 If
-.I oset
-is not null,
+.Fa oset
+is not null, it is set to
 the previous value of the signal mask.
 When
 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
+.Fa set
+is null,
+the value of
+.Ar how
+is insignificant and the mask remains unset
+providing a way to examine the signal mask without modification.
+.Pp
 The system
 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
+quietly disallows
+.Dv SIGKILL
+or
+.Dv SIGSTOP
+to be blocked.
+.Sh RETURN VALUES
+A 0 value indicated that the call succeeded.  A -1 return value
 indicates an error occurred and
 indicates an error occurred and
-.I errno
+.Va errno
 is set to indicated the reason.
 is set to indicated the reason.
-.SH ERRORS
+.Sh ERRORS
 The
 The
-.I sigprocmask
+.Fn sigprocmask
 call will fail and the signal mask will be unchanged if one
 of the following occurs:
 call will fail and the signal mask will be unchanged if one
 of the following occurs:
-.TP 15
-[EINVAL]
-.I how
+.Bl -tag -width Bq Er EINVAL
+.It Bq Er EINVAL
+.Fa how
 has a value other than those listed here.
 has a value other than those listed here.
-.SH "SEE ALSO"
-kill(2), sigaction(2), sigsetops(2), sigsuspend(2)
+.Sh SEE ALSO
+.Xr kill 2 ,
+.Xr sigaction 2 ,
+.Xr sigsetops 3 ,
+.Xr sigsuspend 2
+.Sh STANDARDS
+The
+.Nm sigprocmask
+function call is expected to
+conform to
+.St -p1003.1-88 .