from the ANSI standard
[unix-history] / usr / src / lib / libc / stdlib / exit.3
CommitLineData
f80403ef
KB
1.\" Copyright (c) 1990 The Regents of the University of California.
2.\" All rights reserved.
668ef77e 3.\"
f80403ef
KB
4.\" %sccs.include.redist.man%
5.\"
6.\" @(#)exit.3 6.3 (Berkeley) %G%
668ef77e 7.\"
2d5a7847 8.TH EXIT 3 ""
668ef77e
KM
9.UC 5
10.SH NAME
f80403ef 11exit \- perform normal program termination
668ef77e
KM
12.SH SYNOPSIS
13.nf
14.ft B
15exit(status)
16int status;
17.fi
18.SH DESCRIPTION
19.I Exit
f80403ef
KB
20terminates a process.
21.PP
22Before termination it performs the following functions in the
23order listed:
24.RS
25.PP
26Call the functions registered with the
27.IR atexit (3)
28function, in the reverse order of their registration.
29.PP
30Flush all open output streams.
31.PP
32Close all open streams.
33.PP
34Unlink all files created with the
35.IR tmpfile (3)
36function.
37.RE
38.PP
668ef77e
KM
39.I Exit
40never returns.
41.SH "SEE ALSO"
f80403ef
KB
42exit(2), atexit(3), intro(3), tmpfile(3)
43.SH STANDARDS
44.B Exit
45conforms to ANSI X3.159-1989 (``ANSI C'').