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