diff options
author | 2013-06-05 04:06:08 +0000 | |
---|---|---|
committer | 2013-06-05 04:06:08 +0000 | |
commit | 89e2fe5c3827dc04a644abbef6f9ceefb22adc9e (patch) | |
tree | 52cb8dad70f3cffe5fb223a96652de98393c0170 | |
parent | i copied .Fd just like everybody else. use .In (diff) | |
download | wireguard-openbsd-89e2fe5c3827dc04a644abbef6f9ceefb22adc9e.tar.xz wireguard-openbsd-89e2fe5c3827dc04a644abbef6f9ceefb22adc9e.zip |
Move _Exit() from the exit() manpage to the _exit() manpage, as it's
just an alias of the latter.
ok matthew@ tedu@
-rw-r--r-- | lib/libc/stdlib/Makefile.inc | 3 | ||||
-rw-r--r-- | lib/libc/stdlib/exit.3 | 43 | ||||
-rw-r--r-- | lib/libc/sys/Makefile.inc | 3 | ||||
-rw-r--r-- | lib/libc/sys/_exit.2 | 30 |
4 files changed, 36 insertions, 43 deletions
diff --git a/lib/libc/stdlib/Makefile.inc b/lib/libc/stdlib/Makefile.inc index 5f3a142ec42..d75fe5f7b12 100644 --- a/lib/libc/stdlib/Makefile.inc +++ b/lib/libc/stdlib/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.47 2012/12/03 20:08:33 millert Exp $ +# $OpenBSD: Makefile.inc,v 1.48 2013/06/05 04:06:08 guenther Exp $ # stdlib sources .PATH: ${LIBCSRCDIR}/arch/${MACHINE_CPU}/stdlib ${LIBCSRCDIR}/stdlib @@ -38,7 +38,6 @@ MAN+= a64l.3 abort.3 abs.3 alloca.3 atexit.3 atof.3 atoi.3 atol.3 atoll.3 \ qabs.3 qdiv.3 qsort.3 radixsort.3 rand48.3 rand.3 random.3 realpath.3 \ strtod.3 strtonum.3 strtol.3 strtoul.3 system.3 tsearch.3 -MLINKS+=exit.3 _Exit.3 MLINKS+=ecvt.3 fcvt.3 ecvt.3 gcvt.3 MLINKS+=getenv.3 setenv.3 getenv.3 unsetenv.3 getenv.3 putenv.3 MLINKS+=getopt_long.3 getopt_long_only.3 diff --git a/lib/libc/stdlib/exit.3 b/lib/libc/stdlib/exit.3 index 11d4bc2304e..86c4daed537 100644 --- a/lib/libc/stdlib/exit.3 +++ b/lib/libc/stdlib/exit.3 @@ -29,30 +29,25 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: exit.3,v 1.13 2013/06/05 03:39:23 tedu Exp $ +.\" $OpenBSD: exit.3,v 1.14 2013/06/05 04:06:08 guenther Exp $ .\" .Dd $Mdocdate: June 5 2013 $ .Dt EXIT 3 .Os .Sh NAME -.Nm exit, _Exit +.Nm exit .Nd perform normal program termination .Sh SYNOPSIS .In stdlib.h .Ft void .Fn exit "int status" -.Ft void -.Fn _Exit "int status" .Sh DESCRIPTION The .Fn exit -and -.Fn _Exit -functions terminate a process. +function terminates a process. .Pp -Before termination, -.Fn exit -performs the following operations in the order listed: +Before termination it performs the following functions in the +order listed: .Bl -enum -offset indent .It Call the functions registered with the @@ -68,25 +63,9 @@ Unlink all files created with the function. .El .Pp -The -.Fn _Exit -function terminates without calling the functions registered with the -.Xr atexit 3 -function. -The -.Ox -implementation of -.Fn _Exit -does not flush open output streams or unlink files created with the -.Xr tmpfile 3 -function. -However, this behavior is implementation-specific. -.Pp -Lastly, +Following this, .Fn exit -and -.Fn _Exit -call +calls .Xr _exit 2 . Note that typically .Xr _exit 2 @@ -96,9 +75,7 @@ on to the parent, thus negative values have less meaning. .Sh RETURN VALUES The .Fn exit -and -.Fn _Exit -functions never return. +function never returns. .Sh SEE ALSO .Xr _exit 2 , .Xr atexit 3 , @@ -108,9 +85,7 @@ functions never return. .Sh STANDARDS The .Fn exit -and -.Fn _Exit -functions conform to +function conforms to .St -ansiC-99 . .Sh HISTORY An diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc index b26ccc211af..b1257bda135 100644 --- a/lib/libc/sys/Makefile.inc +++ b/lib/libc/sys/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.112 2013/06/01 09:49:53 miod Exp $ +# $OpenBSD: Makefile.inc,v 1.113 2013/06/05 04:06:08 guenther Exp $ # $NetBSD: Makefile.inc,v 1.35 1995/10/16 23:49:07 jtc Exp $ # @(#)Makefile.inc 8.1 (Berkeley) 6/17/93 @@ -199,6 +199,7 @@ MAN+= __get_tcb.2 __thrsigdivert.2 __thrsleep.2 _exit.2 accept.2 \ MLINKS+=__get_tcb.2 __set_tcb.2 MLINKS+=__thrsleep.2 __thrwakeup.2 +MLINKS+=_exit.2 _Exit.2 MLINKS+=access.2 faccessat.2 MLINKS+=brk.2 sbrk.2 MLINKS+=chdir.2 fchdir.2 diff --git a/lib/libc/sys/_exit.2 b/lib/libc/sys/_exit.2 index 3fb185ef68f..82cd5645a4e 100644 --- a/lib/libc/sys/_exit.2 +++ b/lib/libc/sys/_exit.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: _exit.2,v 1.17 2011/11/17 14:26:14 schwarze Exp $ +.\" $OpenBSD: _exit.2,v 1.18 2013/06/05 04:06:08 guenther Exp $ .\" $NetBSD: _exit.2,v 1.6 1995/02/27 12:31:34 cgd Exp $ .\" .\" Copyright (c) 1980, 1993 @@ -30,22 +30,30 @@ .\" .\" @(#)_exit.2 8.1 (Berkeley) 6/4/93 .\" -.Dd $Mdocdate: November 17 2011 $ +.Dd $Mdocdate: June 5 2013 $ .Dt _EXIT 2 .Os .Sh NAME -.Nm _exit +.Nm _exit , +.Nm _Exit .Nd terminate the calling process .Sh SYNOPSIS .Fd #include <unistd.h> .Ft void .Fn _exit "int status" +.Fd #include <stdlib.h> +.Ft void +.Fn _Exit "int status" .Sh DESCRIPTION The .Fn _exit -function terminates a process with the following consequences: +and +.Fn _Exit +functions terminate a process with the following consequences: .Bl -bullet .It +All threads in the process are terminated. +.It All open file descriptors in the calling process are closed. This may entail delays; for example, waiting for output to drain. A process in this state may not be killed, as it is already dying. @@ -96,6 +104,8 @@ and then calls .Fn _exit . .Sh RETURN VALUES .Fn _exit +and +.Fn _Exit can never return. .Sh SEE ALSO .Xr fork 2 , @@ -107,8 +117,12 @@ can never return. .Sh STANDARDS The .Fn _exit -function is defined by -.St -p1003.1-88 . +function conform to +.St -p1003.1-2008 . +The +.Fn _Exit +function conforms to +.St -ansiC-99 . .Sh HISTORY An .Fn exit @@ -118,3 +132,7 @@ and an .Fn _exit variant in .At v7 . +The +.Fn _Exit +function appeared in +.Ox 3.6 . |