summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorguenther <>2013-06-05 04:06:08 +0000
committerguenther <>2013-06-05 04:06:08 +0000
commit93ea33ae58b1293bd129bc91689dc622e69810df (patch)
treee30c4955de5ff5f2fd536d20239109ebfd8cd093 /src
parent9144d249f7d631607805dfaa764531b75021a078 (diff)
downloadopenbsd-93ea33ae58b1293bd129bc91689dc622e69810df.tar.gz
openbsd-93ea33ae58b1293bd129bc91689dc622e69810df.tar.bz2
openbsd-93ea33ae58b1293bd129bc91689dc622e69810df.zip
Move _Exit() from the exit() manpage to the _exit() manpage, as it's
just an alias of the latter. ok matthew@ tedu@
Diffstat (limited to 'src')
-rw-r--r--src/lib/libc/stdlib/Makefile.inc3
-rw-r--r--src/lib/libc/stdlib/exit.343
2 files changed, 10 insertions, 36 deletions
diff --git a/src/lib/libc/stdlib/Makefile.inc b/src/lib/libc/stdlib/Makefile.inc
index 5f3a142ec4..d75fe5f7b1 100644
--- a/src/lib/libc/stdlib/Makefile.inc
+++ b/src/lib/libc/stdlib/Makefile.inc
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile.inc,v 1.47 2012/12/03 20:08:33 millert Exp $ 1# $OpenBSD: Makefile.inc,v 1.48 2013/06/05 04:06:08 guenther Exp $
2 2
3# stdlib sources 3# stdlib sources
4.PATH: ${LIBCSRCDIR}/arch/${MACHINE_CPU}/stdlib ${LIBCSRCDIR}/stdlib 4.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 \
38 qabs.3 qdiv.3 qsort.3 radixsort.3 rand48.3 rand.3 random.3 realpath.3 \ 38 qabs.3 qdiv.3 qsort.3 radixsort.3 rand48.3 rand.3 random.3 realpath.3 \
39 strtod.3 strtonum.3 strtol.3 strtoul.3 system.3 tsearch.3 39 strtod.3 strtonum.3 strtol.3 strtoul.3 system.3 tsearch.3
40 40
41MLINKS+=exit.3 _Exit.3
42MLINKS+=ecvt.3 fcvt.3 ecvt.3 gcvt.3 41MLINKS+=ecvt.3 fcvt.3 ecvt.3 gcvt.3
43MLINKS+=getenv.3 setenv.3 getenv.3 unsetenv.3 getenv.3 putenv.3 42MLINKS+=getenv.3 setenv.3 getenv.3 unsetenv.3 getenv.3 putenv.3
44MLINKS+=getopt_long.3 getopt_long_only.3 43MLINKS+=getopt_long.3 getopt_long_only.3
diff --git a/src/lib/libc/stdlib/exit.3 b/src/lib/libc/stdlib/exit.3
index 11d4bc2304..86c4daed53 100644
--- a/src/lib/libc/stdlib/exit.3
+++ b/src/lib/libc/stdlib/exit.3
@@ -29,30 +29,25 @@
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE. 30.\" SUCH DAMAGE.
31.\" 31.\"
32.\" $OpenBSD: exit.3,v 1.13 2013/06/05 03:39:23 tedu Exp $ 32.\" $OpenBSD: exit.3,v 1.14 2013/06/05 04:06:08 guenther Exp $
33.\" 33.\"
34.Dd $Mdocdate: June 5 2013 $ 34.Dd $Mdocdate: June 5 2013 $
35.Dt EXIT 3 35.Dt EXIT 3
36.Os 36.Os
37.Sh NAME 37.Sh NAME
38.Nm exit, _Exit 38.Nm exit
39.Nd perform normal program termination 39.Nd perform normal program termination
40.Sh SYNOPSIS 40.Sh SYNOPSIS
41.In stdlib.h 41.In stdlib.h
42.Ft void 42.Ft void
43.Fn exit "int status" 43.Fn exit "int status"
44.Ft void
45.Fn _Exit "int status"
46.Sh DESCRIPTION 44.Sh DESCRIPTION
47The 45The
48.Fn exit 46.Fn exit
49and 47function terminates a process.
50.Fn _Exit
51functions terminate a process.
52.Pp 48.Pp
53Before termination, 49Before termination it performs the following functions in the
54.Fn exit 50order listed:
55performs the following operations in the order listed:
56.Bl -enum -offset indent 51.Bl -enum -offset indent
57.It 52.It
58Call the functions registered with the 53Call the functions registered with the
@@ -68,25 +63,9 @@ Unlink all files created with the
68function. 63function.
69.El 64.El
70.Pp 65.Pp
71The 66Following this,
72.Fn _Exit
73function terminates without calling the functions registered with the
74.Xr atexit 3
75function.
76The
77.Ox
78implementation of
79.Fn _Exit
80does not flush open output streams or unlink files created with the
81.Xr tmpfile 3
82function.
83However, this behavior is implementation-specific.
84.Pp
85Lastly,
86.Fn exit 67.Fn exit
87and 68calls
88.Fn _Exit
89call
90.Xr _exit 2 . 69.Xr _exit 2 .
91Note that typically 70Note that typically
92.Xr _exit 2 71.Xr _exit 2
@@ -96,9 +75,7 @@ on to the parent, thus negative values have less meaning.
96.Sh RETURN VALUES 75.Sh RETURN VALUES
97The 76The
98.Fn exit 77.Fn exit
99and 78function never returns.
100.Fn _Exit
101functions never return.
102.Sh SEE ALSO 79.Sh SEE ALSO
103.Xr _exit 2 , 80.Xr _exit 2 ,
104.Xr atexit 3 , 81.Xr atexit 3 ,
@@ -108,9 +85,7 @@ functions never return.
108.Sh STANDARDS 85.Sh STANDARDS
109The 86The
110.Fn exit 87.Fn exit
111and 88function conforms to
112.Fn _Exit
113functions conform to
114.St -ansiC-99 . 89.St -ansiC-99 .
115.Sh HISTORY 90.Sh HISTORY
116An 91An