Browse Source

Move _Exit() from the exit() manpage to the _exit() manpage, as it's

just an alias of the latter.
ok matthew@ tedu@
OPENBSD_5_4
guenther 12 years ago
parent
commit
c2e0eb431a
2 changed files with 10 additions and 36 deletions
  1. +1
    -2
      src/lib/libc/stdlib/Makefile.inc
  2. +9
    -34
      src/lib/libc/stdlib/exit.3

+ 1
- 2
src/lib/libc/stdlib/Makefile.inc View File

@ -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 # stdlib sources
.PATH: ${LIBCSRCDIR}/arch/${MACHINE_CPU}/stdlib ${LIBCSRCDIR}/stdlib .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 \ 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 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+=ecvt.3 fcvt.3 ecvt.3 gcvt.3
MLINKS+=getenv.3 setenv.3 getenv.3 unsetenv.3 getenv.3 putenv.3 MLINKS+=getenv.3 setenv.3 getenv.3 unsetenv.3 getenv.3 putenv.3
MLINKS+=getopt_long.3 getopt_long_only.3 MLINKS+=getopt_long.3 getopt_long_only.3


+ 9
- 34
src/lib/libc/stdlib/exit.3 View File

@ -29,30 +29,25 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" 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 $ .Dd $Mdocdate: June 5 2013 $
.Dt EXIT 3 .Dt EXIT 3
.Os .Os
.Sh NAME .Sh NAME
.Nm exit, _Exit .Nm exit
.Nd perform normal program termination .Nd perform normal program termination
.Sh SYNOPSIS .Sh SYNOPSIS
.In stdlib.h .In stdlib.h
.Ft void .Ft void
.Fn exit "int status" .Fn exit "int status"
.Ft void
.Fn _Exit "int status"
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn exit .Fn exit
and function terminates a process.
.Fn _Exit
functions terminate a process.
.Pp .Pp
Before termination, Before termination it performs the following functions in the
.Fn exit order listed:
performs the following operations in the order listed:
.Bl -enum -offset indent .Bl -enum -offset indent
.It .It
Call the functions registered with the Call the functions registered with the
@ -68,25 +63,9 @@ Unlink all files created with the
function. function.
.El .El
.Pp .Pp
The Following this,
.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,
.Fn exit .Fn exit
and calls
.Fn _Exit
call
.Xr _exit 2 . .Xr _exit 2 .
Note that typically Note that typically
.Xr _exit 2 .Xr _exit 2
@ -96,9 +75,7 @@ on to the parent, thus negative values have less meaning.
.Sh RETURN VALUES .Sh RETURN VALUES
The The
.Fn exit .Fn exit
and function never returns.
.Fn _Exit
functions never return.
.Sh SEE ALSO .Sh SEE ALSO
.Xr _exit 2 , .Xr _exit 2 ,
.Xr atexit 3 , .Xr atexit 3 ,
@ -108,9 +85,7 @@ functions never return.
.Sh STANDARDS .Sh STANDARDS
The The
.Fn exit .Fn exit
and function conforms to
.Fn _Exit
functions conform to
.St -ansiC-99 . .St -ansiC-99 .
.Sh HISTORY .Sh HISTORY
An An


|||||||
|||||||
xxxxxxxxxx
 
000:0
x
 
000:0
Loading…
Cancel
Save