Module Name: src Committed By: christos Date: Sun Jun 5 17:16:44 UTC 2016
Modified Files: src/lib/libc/gen: Makefile.inc signal.3 Added Files: src/lib/libc/gen: bsd_signal.3 Log Message: Document bsd_signal (From GSoC 2016 by Charles Cui) To generate a diff of this commit: cvs rdiff -u -r1.194 -r1.195 src/lib/libc/gen/Makefile.inc cvs rdiff -u -r0 -r1.1 src/lib/libc/gen/bsd_signal.3 cvs rdiff -u -r1.24 -r1.25 src/lib/libc/gen/signal.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libc/gen/Makefile.inc diff -u src/lib/libc/gen/Makefile.inc:1.194 src/lib/libc/gen/Makefile.inc:1.195 --- src/lib/libc/gen/Makefile.inc:1.194 Sat Apr 2 20:19:42 2016 +++ src/lib/libc/gen/Makefile.inc Sun Jun 5 13:16:44 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.194 2016/04/03 00:19:42 christos Exp $ +# $NetBSD: Makefile.inc,v 1.195 2016/06/05 17:16:44 christos Exp $ # from: @(#)Makefile.inc 8.6 (Berkeley) 5/4/95 # gen sources @@ -53,8 +53,8 @@ COPTS.syslog.c = -Wno-format-nonliteral .include "${ARCHDIR}/gen/Makefile.inc" -MAN+= alarm.3 arc4random.3 basename.3 bswap.3 clock.3 closefrom.3 \ - confstr.3 \ +MAN+= alarm.3 arc4random.3 basename.3 bsd_signal.3 bswap.3 \ + clock.3 closefrom.3 confstr.3 \ cpuset.3 ctermid.3 ctype.3 daemon.3 devname.3 directory.3 dirname.3 \ endutxent.3 err.3 exec.3 extattr_copy_file.3 extattr_namespace_to_string.3 \ fmtcheck.3 fmtmsg.3 fnmatch.3 fpclassify.3 fpgetmask.3 \ Index: src/lib/libc/gen/signal.3 diff -u src/lib/libc/gen/signal.3:1.24 src/lib/libc/gen/signal.3:1.25 --- src/lib/libc/gen/signal.3:1.24 Sun Jun 13 15:17:06 2004 +++ src/lib/libc/gen/signal.3 Sun Jun 5 13:16:44 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: signal.3,v 1.24 2004/06/13 19:17:06 lha Exp $ +.\" $NetBSD: signal.3,v 1.25 2016/06/05 17:16:44 christos Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)signal.3 8.3 (Berkeley) 4/19/94 .\" -.Dd June 11, 2004 +.Dd June 5, 2016 .Dt SIGNAL 3 .Os .Sh NAME @@ -43,6 +43,8 @@ .\" fix it. .Ft void \*(lp* .Fn signal "int sig" "void \*(lp*func\*(rp\*(lpint\*(rp\*(rp\*(rp\*(lpint" +.Ft void \*(lp* +.Fn bsd_signal "int sig" "void \*(lp*func\*(rp\*(lpint\*(rp\*(rp\*(rp\*(lpint" .Sh DESCRIPTION This .Fn signal @@ -179,6 +181,7 @@ or .Xr sigaltstack 2 , .Xr sigprocmask 2 , .Xr sigsuspend 2 , +.Xr bsd_signal 3 , .Xr psignal 3 , .Xr setjmp 3 , .Xr strsignal 3 , Added files: Index: src/lib/libc/gen/bsd_signal.3 diff -u /dev/null src/lib/libc/gen/bsd_signal.3:1.1 --- /dev/null Sun Jun 5 13:16:44 2016 +++ src/lib/libc/gen/bsd_signal.3 Sun Jun 5 13:16:44 2016 @@ -0,0 +1,68 @@ +.\" $NetBSD: bsd_signal.3,v 1.1 2016/06/05 17:16:44 christos Exp $ +.\" +.\" Copyright (c) 1980, 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. +.\" +.\" @(#)bsd_signal.3 8.3 (Berkeley) 4/19/94 +.\" +.Dd June 04, 2016 +.Dt BSD_SIGNAL 3 +.Os +.Sh NAME +.Nm bsd_signal +.Nd BSD version of +.Xr signal +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In signal.h +.\" The following is Quite Ugly, but syntactically correct. Don't try to +.\" fix it. +.Ft void \*(lp* +.Fn bsd_signal "int sig" "void \*(lp*func\*(rp\*(lpint\*(rp\*(rp\*(rp\*(lpint" +.Sh DESCRIPTION +The +.Fn bsd_signal +function provides a partially compatible interface for programs written to +historical system interfaces. +.Sh RETURN VALUES +The previous action is returned on a successful call. +Otherwise, +.Dv SIG_ERR +is returned and the global variable +.Va errno +is set to indicate the error. +.Sh SEE ALSO +.Xr signal 3 +.Sh STANDARDS +The +.Fn bsd_signal +function conforms to +.St -p1003.1-2004 . +It was moved from X/Open to zbase in Issue 4 version 2. +It first appeared in +.Nx 8 .