9103 opengroup acknowledgement should be properly formatted in man pages
[unleashed.git] / usr / src / man / man3c / exit.3c
blobfe58c304e21fc07021123f7554414399d58835d5
1 '\" te
2 .\"  Copyright 1989 AT&T  Copyright (c) 2004, Sun Microsystems, Inc.  All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH EXIT 3C "Mar 1, 2004"
7 .SH NAME
8 exit, _exithandle \- terminate process
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <stdlib.h>
14 \fBvoid\fR \fBexit\fR(\fBint\fR \fIstatus\fR);
15 .fi
17 .LP
18 .nf
19 \fBvoid\fR \fB_exithandle\fR(\fBvoid\fR);
20 .fi
22 .SH DESCRIPTION
23 .sp
24 .LP
25 The \fBexit()\fR function terminates a process by calling first
26 \fB_exithandle()\fR and then \fB_exit()\fR (see \fBexit\fR(2)).
27 .sp
28 .LP
29 The  \fB_exithandle()\fR function calls any functions registered through the
30 \fBatexit\fR(3C) function in the reverse order of their registration. This
31 action includes executing all finalization code from the \fI\&.fini\fR sections
32 of all objects that are part of the process.
33 .sp
34 .LP
35 The \fB_exithandle()\fR function is intended for use \fIonly\fR with
36 \fB_exit()\fR, and allows for specialized processing such as \fBdldump\fR(3C)
37 to be performed. Normal process execution should not be continued after a call
38 to \fB_exithandle()\fR has occurred, as internal data structures may have been
39 torn down due to \fBatexit()\fR or \fI\&.fini\fR processing.
40 .sp
41 .LP
42 The symbols \fBEXIT_SUCCESS\fR and \fBEXIT_FAILURE\fR are defined in the header
43 <\fBstdlib.h\fR> and may be used as the value of \fIstatus\fR to indicate
44 successful or unsuccessful termination, respectively.
45 .SH ATTRIBUTES
46 .sp
47 .LP
48 See \fBattributes\fR(5) for descriptions of the following attributes:
49 .sp
51 .sp
52 .TS
53 box;
54 c | c
55 l | l .
56 ATTRIBUTE TYPE  ATTRIBUTE VALUE
58 MT-Level        Safe
59 .TE
61 .SH SEE ALSO
62 .sp
63 .LP
64 \fBexit\fR(2), \fBatexit\fR(3C), \fBdldump\fR(3C), \fBattributes\fR(5),
65 \fBstandards\fR(5)