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