diff options
Diffstat (limited to 'src/lib/libc/stdlib/exit.3')
-rw-r--r-- | src/lib/libc/stdlib/exit.3 | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/src/lib/libc/stdlib/exit.3 b/src/lib/libc/stdlib/exit.3 index adb81ffcb4..8c4b2eed2c 100644 --- a/src/lib/libc/stdlib/exit.3 +++ b/src/lib/libc/stdlib/exit.3 | |||
@@ -13,11 +13,7 @@ | |||
13 | .\" 2. Redistributions in binary form must reproduce the above copyright | 13 | .\" 2. Redistributions in binary form must reproduce the above copyright |
14 | .\" notice, this list of conditions and the following disclaimer in the | 14 | .\" notice, this list of conditions and the following disclaimer in the |
15 | .\" documentation and/or other materials provided with the distribution. | 15 | .\" documentation and/or other materials provided with the distribution. |
16 | .\" 3. All advertising materials mentioning features or use of this software | 16 | .\" 3. Neither the name of the University nor the names of its contributors |
17 | .\" must display the following acknowledgement: | ||
18 | .\" This product includes software developed by the University of | ||
19 | .\" California, Berkeley and its contributors. | ||
20 | .\" 4. Neither the name of the University nor the names of its contributors | ||
21 | .\" may be used to endorse or promote products derived from this software | 17 | .\" may be used to endorse or promote products derived from this software |
22 | .\" without specific prior written permission. | 18 | .\" without specific prior written permission. |
23 | .\" | 19 | .\" |
@@ -33,8 +29,7 @@ | |||
33 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
34 | .\" SUCH DAMAGE. | 30 | .\" SUCH DAMAGE. |
35 | .\" | 31 | .\" |
36 | .\" from: @(#)exit.3 6.6 (Berkeley) 6/29/91 | 32 | .\" $OpenBSD: exit.3,v 1.9 2003/06/02 20:18:37 millert Exp $ |
37 | .\" $Id: exit.3,v 1.1.1.1 1995/10/18 08:42:17 deraadt Exp $ | ||
38 | .\" | 33 | .\" |
39 | .Dd June 29, 1991 | 34 | .Dd June 29, 1991 |
40 | .Dt EXIT 3 | 35 | .Dt EXIT 3 |
@@ -47,8 +42,9 @@ | |||
47 | .Ft void | 42 | .Ft void |
48 | .Fn exit "int status" | 43 | .Fn exit "int status" |
49 | .Sh DESCRIPTION | 44 | .Sh DESCRIPTION |
50 | .Fn Exit | 45 | The |
51 | terminates a process. | 46 | .Fn exit |
47 | function terminates a process. | ||
52 | .Pp | 48 | .Pp |
53 | Before termination it performs the following functions in the | 49 | Before termination it performs the following functions in the |
54 | order listed: | 50 | order listed: |
@@ -66,19 +62,28 @@ Unlink all files created with the | |||
66 | .Xr tmpfile 3 | 62 | .Xr tmpfile 3 |
67 | function. | 63 | function. |
68 | .El | 64 | .El |
65 | .Pp | ||
66 | Following this, | ||
67 | .Fn exit | ||
68 | calls | ||
69 | .Xr _exit 2 . | ||
70 | Note that typically | ||
71 | .Xr _exit 2 | ||
72 | only passes the lower 8 bits of | ||
73 | .Fa status | ||
74 | on to the parent, thus negative values have less meaning. | ||
69 | .Sh RETURN VALUES | 75 | .Sh RETURN VALUES |
70 | The | 76 | The |
71 | .Fn exit | 77 | .Fn exit |
72 | function | 78 | function never returns. |
73 | never returns. | ||
74 | .Sh SEE ALSO | 79 | .Sh SEE ALSO |
75 | .Xr _exit 2 , | 80 | .Xr _exit 2 , |
76 | .Xr atexit 3 , | 81 | .Xr atexit 3 , |
77 | .Xr intro 3 , | 82 | .Xr intro 3 , |
83 | .Xr sysexits 3 , | ||
78 | .Xr tmpfile 3 | 84 | .Xr tmpfile 3 |
79 | .Sh STANDARDS | 85 | .Sh STANDARDS |
80 | The | 86 | The |
81 | .Fn exit | 87 | .Fn exit |
82 | function | 88 | function conforms to |
83 | conforms to | ||
84 | .St -ansiC . | 89 | .St -ansiC . |