typo
[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.\"
78137f6c 6.\" @(#)exit.3 6.4 (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
78137f6c
KB
15#include <stdlib.h>
16
17void
668ef77e
KM
18exit(status)
19int status;
20.fi
21.SH DESCRIPTION
22.I Exit
f80403ef
KB
23terminates a process.
24.PP
25Before termination it performs the following functions in the
26order listed:
27.RS
28.PP
29Call the functions registered with the
30.IR atexit (3)
31function, in the reverse order of their registration.
32.PP
33Flush all open output streams.
34.PP
35Close all open streams.
36.PP
37Unlink all files created with the
38.IR tmpfile (3)
39function.
40.RE
41.PP
668ef77e
KM
42.I Exit
43never returns.
44.SH "SEE ALSO"
f80403ef
KB
45exit(2), atexit(3), intro(3), tmpfile(3)
46.SH STANDARDS
47.B Exit
48conforms to ANSI X3.159-1989 (``ANSI C'').