From: deraadt Date: Mon, 29 May 2017 09:40:02 +0000 (+0000) Subject: It is distasteful to have manual pages which don't refer to real X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b203dfbc0be83a7ea7eebcfacf10c1b49349ab54;p=openbsd It is distasteful to have manual pages which don't refer to real function calls, but instead a "class" of functions like "sigsetops". Rename to sigaddset", and while at it improve documentation in sigprocmask(2) to point to it. ok tedu --- diff --git a/lib/libc/compat-43/sigblock.3 b/lib/libc/compat-43/sigblock.3 index e2781287b0a..15403cd6581 100644 --- a/lib/libc/compat-43/sigblock.3 +++ b/lib/libc/compat-43/sigblock.3 @@ -25,9 +25,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: sigblock.3,v 1.17 2014/04/07 17:57:56 schwarze Exp $ +.\" $OpenBSD: sigblock.3,v 1.18 2017/05/29 09:40:02 deraadt Exp $ .\" -.Dd $Mdocdate: April 7 2014 $ +.Dd $Mdocdate: May 29 2017 $ .Dt SIGBLOCK 3 .Os .Sh NAME @@ -108,7 +108,7 @@ sigprocmask(SIG_BLOCK, NULL, &set); .Xr sigaction 2 , .Xr sigprocmask 2 , .Xr sigsetmask 3 , -.Xr sigsetops 3 +.Xr sigaddset 3 .Sh HISTORY A .Fn sigblock diff --git a/lib/libc/compat-43/sigsetmask.3 b/lib/libc/compat-43/sigsetmask.3 index 20cab697968..3cc43dadab9 100644 --- a/lib/libc/compat-43/sigsetmask.3 +++ b/lib/libc/compat-43/sigsetmask.3 @@ -25,9 +25,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: sigsetmask.3,v 1.15 2013/07/17 05:42:10 schwarze Exp $ +.\" $OpenBSD: sigsetmask.3,v 1.16 2017/05/29 09:40:02 deraadt Exp $ .\" -.Dd $Mdocdate: July 17 2013 $ +.Dd $Mdocdate: May 29 2017 $ .Dt SIGSETMASK 3 .Os .Sh NAME @@ -127,7 +127,7 @@ sigemptyset(&eset); .Xr sigprocmask 2 , .Xr sigsuspend 2 , .Xr sigblock 3 , -.Xr sigsetops 3 , +.Xr sigaddset 3 , .Xr sigvec 3 .Sh HISTORY A diff --git a/lib/libc/compat-43/sigvec.3 b/lib/libc/compat-43/sigvec.3 index 37378747823..95114864f88 100644 --- a/lib/libc/compat-43/sigvec.3 +++ b/lib/libc/compat-43/sigvec.3 @@ -25,9 +25,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: sigvec.3,v 1.33 2015/01/15 19:26:27 schwarze Exp $ +.\" $OpenBSD: sigvec.3,v 1.34 2017/05/29 09:40:02 deraadt Exp $ .\" -.Dd $Mdocdate: January 15 2015 $ +.Dd $Mdocdate: May 29 2017 $ .Dt SIGVEC 3 .Os .Sh NAME @@ -316,7 +316,7 @@ or .Xr siginterrupt 3 , .Xr sigpause 3 , .Xr sigsetmask 3 , -.Xr sigsetops 3 , +.Xr sigaddset 3 , .Xr tty 4 .Sh HISTORY A diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc index 8a2fd384747..7b332cd407c 100644 --- a/lib/libc/gen/Makefile.inc +++ b/lib/libc/gen/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.74 2016/05/23 00:18:56 guenther Exp $ +# $OpenBSD: Makefile.inc,v 1.75 2017/05/29 09:40:02 deraadt Exp $ # gen sources .PATH: ${LIBCSRCDIR}/arch/${MACHINE_CPU}/gen ${LIBCSRCDIR}/gen @@ -52,6 +52,6 @@ MAN+= __tfork_thread.3 alarm.3 auth_subr.3 authenticate.3 basename.3 clock.3 \ psignal.3 pw_dup.3 pwcache.3 raise.3 readpassphrase.3 \ scandir.3 setjmp.3 setmode.3 setproctitle.3 shm_open.3 \ siginterrupt.3 signal.3 \ - sigsetops.3 sleep.3 statvfs.3 sysconf.3 sysctl.3 strtofflags.3 \ + sigaddset.3 sleep.3 statvfs.3 sysconf.3 sysctl.3 strtofflags.3 \ syslog.3 time.3 times.3 toascii.3 tolower.3 toupper.3 \ ttyname.3 ualarm.3 uname.3 unvis.3 usleep.3 utime.3 valloc.3 vis.3 diff --git a/lib/libc/gen/posix_spawnattr_getpgroup.3 b/lib/libc/gen/posix_spawnattr_getpgroup.3 index fa7efd742a1..544a5a9f1b7 100644 --- a/lib/libc/gen/posix_spawnattr_getpgroup.3 +++ b/lib/libc/gen/posix_spawnattr_getpgroup.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: posix_spawnattr_getpgroup.3,v 1.8 2014/11/30 02:41:43 schwarze Exp $ +.\" $OpenBSD: posix_spawnattr_getpgroup.3,v 1.9 2017/05/29 09:40:02 deraadt Exp $ .\" .\" Copyright (c) 2012 Marc Espie .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: November 30 2014 $ +.Dd $Mdocdate: May 29 2017 $ .Dt POSIX_SPAWNATTR_GETPGROUP 3 .Os .Sh NAME @@ -72,7 +72,7 @@ Those functions return 0. .Sh SEE ALSO .Xr posix_spawn 3 , .Xr posix_spawnattr_init 3 , -.Xr sigsetops 3 +.Xr sigaddset 3 .Sh STANDARDS These functions conform to .St -p1003.1-2001 . diff --git a/lib/libc/gen/sigaddset.3 b/lib/libc/gen/sigaddset.3 new file mode 100644 index 00000000000..6e8bc5c89a5 --- /dev/null +++ b/lib/libc/gen/sigaddset.3 @@ -0,0 +1,116 @@ +.\" $OpenBSD: sigaddset.3,v 1.1 2017/05/29 09:40:02 deraadt Exp $ +.\" +.\" Copyright (c) 1983, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" 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. 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 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. +.\" +.Dd $Mdocdate: May 29 2017 $ +.Dt SIGADDSET 3 +.Os +.Sh NAME +.Nm sigemptyset , +.Nm sigfillset , +.Nm sigaddset , +.Nm sigdelset , +.Nm sigismember +.Nd manipulate signal sets +.Sh SYNOPSIS +.In signal.h +.Ft int +.Fn sigemptyset "sigset_t *set" +.Ft int +.Fn sigfillset "sigset_t *set" +.Ft int +.Fn sigaddset "sigset_t *set" "int signo" +.Ft int +.Fn sigdelset "sigset_t *set" "int signo" +.Ft int +.Fn sigismember "const sigset_t *set" "int signo" +.Sh DESCRIPTION +These functions manipulate signal sets stored in a +.Fa sigset_t . +Either +.Fn sigemptyset +or +.Fn sigfillset +must be called for every object of type +.Fa sigset_t +before any other use of the object. +.Fn sigemptyset +and +.Fn sigfillset +are provided as macros, but actual functions are available +if their names are undefined (with #undef +.Ar name ) . +.Pp +The +.Fn sigemptyset +function initializes a signal set to be empty. +.Pp +.Fn sigfillset +initializes a signal set to contain all signals. +.Pp +.Fn sigaddset +adds the specified signal +.Fa signo +to the signal set. +.Pp +.Fn sigdelset +deletes the specified signal +.Fa signo +from the signal set. +.Pp +.Fn sigismember +returns whether a specified signal +.Fa signo +is contained in the signal set. +.Sh RETURN VALUES +The +.Fn sigismember +function returns 1 +if the signal is a member of the set and 0 otherwise. +The other functions return 0 upon success. +A \-1 return value +indicates an error occurred and the global variable +.Va errno +is set to indicate the reason. +.Sh ERRORS +These functions may fail if one of the following occurs: +.Bl -tag -width Er +.It Bq Er EINVAL +The specified signal +.Fa signo +is not a valid signal number. +.El +.Sh SEE ALSO +.Xr kill 2 , +.Xr sigaction 2 , +.Xr sigpending 2 , +.Xr sigprocmask 2 , +.Xr sigsuspend 2 +.Sh STANDARDS +These functions are defined by +.St -p1003.1-90 . diff --git a/lib/libc/gen/sigsetops.3 b/lib/libc/gen/sigsetops.3 deleted file mode 100644 index d1754cac4db..00000000000 --- a/lib/libc/gen/sigsetops.3 +++ /dev/null @@ -1,116 +0,0 @@ -.\" $OpenBSD: sigsetops.3,v 1.12 2015/11/10 23:48:18 jmc Exp $ -.\" -.\" Copyright (c) 1983, 1991, 1993 -.\" The Regents of the University of California. All rights reserved. -.\" -.\" 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. 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 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. -.\" -.Dd $Mdocdate: November 10 2015 $ -.Dt SIGEMPTYSET 3 -.Os -.Sh NAME -.Nm sigemptyset , -.Nm sigfillset , -.Nm sigaddset , -.Nm sigdelset , -.Nm sigismember -.Nd manipulate signal sets -.Sh SYNOPSIS -.In signal.h -.Ft int -.Fn sigemptyset "sigset_t *set" -.Ft int -.Fn sigfillset "sigset_t *set" -.Ft int -.Fn sigaddset "sigset_t *set" "int signo" -.Ft int -.Fn sigdelset "sigset_t *set" "int signo" -.Ft int -.Fn sigismember "const sigset_t *set" "int signo" -.Sh DESCRIPTION -These functions manipulate signal sets stored in a -.Fa sigset_t . -Either -.Fn sigemptyset -or -.Fn sigfillset -must be called for every object of type -.Fa sigset_t -before any other use of the object. -.Fn sigemptyset -and -.Fn sigfillset -are provided as macros, but actual functions are available -if their names are undefined (with #undef -.Ar name ) . -.Pp -The -.Fn sigemptyset -function initializes a signal set to be empty. -.Pp -.Fn sigfillset -initializes a signal set to contain all signals. -.Pp -.Fn sigaddset -adds the specified signal -.Fa signo -to the signal set. -.Pp -.Fn sigdelset -deletes the specified signal -.Fa signo -from the signal set. -.Pp -.Fn sigismember -returns whether a specified signal -.Fa signo -is contained in the signal set. -.Sh RETURN VALUES -The -.Fn sigismember -function returns 1 -if the signal is a member of the set and 0 otherwise. -The other functions return 0 upon success. -A \-1 return value -indicates an error occurred and the global variable -.Va errno -is set to indicate the reason. -.Sh ERRORS -These functions may fail if one of the following occurs: -.Bl -tag -width Er -.It Bq Er EINVAL -The specified signal -.Fa signo -is not a valid signal number. -.El -.Sh SEE ALSO -.Xr kill 2 , -.Xr sigaction 2 , -.Xr sigpending 2 , -.Xr sigprocmask 2 , -.Xr sigsuspend 2 -.Sh STANDARDS -These functions are defined by -.St -p1003.1-90 . diff --git a/lib/libc/sys/sigaction.2 b/lib/libc/sys/sigaction.2 index c33a6bd81bd..947111f46d3 100644 --- a/lib/libc/sys/sigaction.2 +++ b/lib/libc/sys/sigaction.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: sigaction.2,v 1.72 2015/10/11 09:51:26 guenther Exp $ +.\" $OpenBSD: sigaction.2,v 1.73 2017/05/29 09:40:02 deraadt Exp $ .\" $NetBSD: sigaction.2,v 1.7 1995/10/12 15:41:16 jtc Exp $ .\" .\" Copyright (c) 1980, 1990, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)sigaction.2 8.2 (Berkeley) 4/3/94 .\" -.Dd $Mdocdate: October 11 2015 $ +.Dd $Mdocdate: May 29 2017 $ .Dt SIGACTION 2 .Os .Sh NAME @@ -196,6 +196,12 @@ the .Dv SA_NOCLDWAIT flag (described below) is implied. .Pp +The signal mask +.Fa sa_mask +is typically manipulated using the +.Xr sigaddset 3 +family of functions. +.Pp Options may be specified by setting .Fa sa_flags . The meaning of the various bits is as follows: @@ -421,7 +427,7 @@ or .Xr setjmp 3 , .Xr sigblock 3 , .Xr sigpause 3 , -.Xr sigsetops 3 , +.Xr sigaddset 3 , .Xr sigvec 3 , .Xr tty 4 .Sh STANDARDS diff --git a/lib/libc/sys/sigpending.2 b/lib/libc/sys/sigpending.2 index d422f32ab0c..02a06625c39 100644 --- a/lib/libc/sys/sigpending.2 +++ b/lib/libc/sys/sigpending.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: sigpending.2,v 1.7 2015/05/31 23:54:25 schwarze Exp $ +.\" $OpenBSD: sigpending.2,v 1.8 2017/05/29 09:40:02 deraadt Exp $ .\" $NetBSD: sigpending.2,v 1.2 1995/02/27 12:37:26 cgd Exp $ .\" .\" Copyright (c) 1993 @@ -33,7 +33,7 @@ .\" .\" @(#)sigpending.2 8.3 (Berkeley) 1/12/94 .\" -.Dd $Mdocdate: May 31 2015 $ +.Dd $Mdocdate: May 29 2017 $ .Dt SIGPENDING 2 .Os .Sh NAME @@ -61,7 +61,7 @@ function does not currently detect any errors. .Sh SEE ALSO .Xr sigaction 2 , .Xr sigprocmask 2 , -.Xr sigsetops 3 +.Xr sigaddset 3 .Sh STANDARDS The .Fn sigpending diff --git a/lib/libc/sys/sigprocmask.2 b/lib/libc/sys/sigprocmask.2 index 346485283b8..0b57058f6e4 100644 --- a/lib/libc/sys/sigprocmask.2 +++ b/lib/libc/sys/sigprocmask.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: sigprocmask.2,v 1.12 2017/05/05 02:12:39 millert Exp $ +.\" $OpenBSD: sigprocmask.2,v 1.13 2017/05/29 09:40:02 deraadt Exp $ .\" $NetBSD: sigprocmask.2,v 1.6 1995/02/27 12:37:33 cgd Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)sigprocmask.2 8.1 (Berkeley) 6/4/93 .\" -.Dd $Mdocdate: May 5 2017 $ +.Dd $Mdocdate: May 29 2017 $ .Dt SIGPROCMASK 2 .Os .Sh NAME @@ -116,7 +116,7 @@ has a value other than those listed here. .Xr sigaction 2 , .Xr sigpending 2 , .Xr sigsuspend 2 , -.Xr sigsetops 3 +.Xr sigaddset 3 .Sh STANDARDS The .Fn sigprocmask diff --git a/lib/libc/sys/sigsuspend.2 b/lib/libc/sys/sigsuspend.2 index 5a06d6777ad..02ba8ad21e0 100644 --- a/lib/libc/sys/sigsuspend.2 +++ b/lib/libc/sys/sigsuspend.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: sigsuspend.2,v 1.13 2015/05/31 23:54:25 schwarze Exp $ +.\" $OpenBSD: sigsuspend.2,v 1.14 2017/05/29 09:40:02 deraadt Exp $ .\" $NetBSD: sigsuspend.2,v 1.4 1995/02/27 12:37:46 cgd Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)sigsuspend.2 8.1 (Berkeley) 6/4/93 .\" -.Dd $Mdocdate: May 31 2015 $ +.Dd $Mdocdate: May 29 2017 $ .Dt SIGSUSPEND 2 .Os .Sh NAME @@ -69,7 +69,7 @@ set to .Sh SEE ALSO .Xr sigaction 2 , .Xr sigprocmask 2 , -.Xr sigsetops 3 +.Xr sigaddset 3 .Sh STANDARDS The .Fn sigsuspend diff --git a/lib/libpthread/man/pthread_sigmask.3 b/lib/libpthread/man/pthread_sigmask.3 index 983ff4d3ee8..1300f9fec36 100644 --- a/lib/libpthread/man/pthread_sigmask.3 +++ b/lib/libpthread/man/pthread_sigmask.3 @@ -1,9 +1,9 @@ -.\" $OpenBSD: pthread_sigmask.3,v 1.10 2013/06/05 03:44:50 tedu Exp $ +.\" $OpenBSD: pthread_sigmask.3,v 1.11 2017/05/29 09:40:02 deraadt Exp $ .\" .\" .\" David Leonard, 1999. Public Domain. .\" -.Dd $Mdocdate: June 5 2013 $ +.Dd $Mdocdate: May 29 2017 $ .Dt PTHREAD_SIGMASK 3 .Os .Sh NAME @@ -64,7 +64,7 @@ is not one of the defined values. .Xr sigprocmask 2 , .Xr sigsuspend 2 , .Xr pthreads 3 , -.Xr sigsetops 3 +.Xr sigaddset 3 .Sh STANDARDS .Fn pthread_sigmask conforms to