summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/exit.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/stdlib/exit.3')
-rw-r--r--src/lib/libc/stdlib/exit.325
1 files changed, 17 insertions, 8 deletions
diff --git a/src/lib/libc/stdlib/exit.3 b/src/lib/libc/stdlib/exit.3
index adb81ffcb4..fb499e0946 100644
--- a/src/lib/libc/stdlib/exit.3
+++ b/src/lib/libc/stdlib/exit.3
@@ -33,8 +33,7 @@
33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34.\" SUCH DAMAGE. 34.\" SUCH DAMAGE.
35.\" 35.\"
36.\" from: @(#)exit.3 6.6 (Berkeley) 6/29/91 36.\" $OpenBSD: exit.3,v 1.8 2003/05/10 06:48:30 jmc Exp $
37.\" $Id: exit.3,v 1.1.1.1 1995/10/18 08:42:17 deraadt Exp $
38.\" 37.\"
39.Dd June 29, 1991 38.Dd June 29, 1991
40.Dt EXIT 3 39.Dt EXIT 3
@@ -47,8 +46,9 @@
47.Ft void 46.Ft void
48.Fn exit "int status" 47.Fn exit "int status"
49.Sh DESCRIPTION 48.Sh DESCRIPTION
50.Fn Exit 49The
51terminates a process. 50.Fn exit
51function terminates a process.
52.Pp 52.Pp
53Before termination it performs the following functions in the 53Before termination it performs the following functions in the
54order listed: 54order listed:
@@ -66,19 +66,28 @@ Unlink all files created with the
66.Xr tmpfile 3 66.Xr tmpfile 3
67function. 67function.
68.El 68.El
69.Pp
70Following this,
71.Fn exit
72calls
73.Xr _exit 2 .
74Note that typically
75.Xr _exit 2
76only passes the lower 8 bits of
77.Fa status
78on to the parent, thus negative values have less meaning.
69.Sh RETURN VALUES 79.Sh RETURN VALUES
70The 80The
71.Fn exit 81.Fn exit
72function 82function never returns.
73never returns.
74.Sh SEE ALSO 83.Sh SEE ALSO
75.Xr _exit 2 , 84.Xr _exit 2 ,
76.Xr atexit 3 , 85.Xr atexit 3 ,
77.Xr intro 3 , 86.Xr intro 3 ,
87.Xr sysexits 3 ,
78.Xr tmpfile 3 88.Xr tmpfile 3
79.Sh STANDARDS 89.Sh STANDARDS
80The 90The
81.Fn exit 91.Fn exit
82function 92function conforms to
83conforms to
84.St -ansiC . 93.St -ansiC .