'\" te .\" Copyright 1989 AT&T Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved .TH exit 3C "1 Mar 2004" "SunOS 5.11" "Standard C Library Functions" .SH NAME exit, _exithandle \- terminate process .SH SYNOPSIS .LP .nf #include \fBvoid\fR \fBexit\fR(\fBint\fR \fIstatus\fR); .fi .LP .nf \fBvoid\fR \fB_exithandle\fR(\fBvoid\fR); .fi .SH DESCRIPTION .sp .LP The \fBexit()\fR function terminates a process by calling first \fB_exithandle()\fR and then \fB_exit()\fR (see \fBexit\fR(2)). .sp .LP The \fB_exithandle()\fR function calls any functions registered through the \fBatexit\fR(3C) function in the reverse order of their registration. This action includes executing all finalization code from the \fI\&.fini\fR sections of all objects that are part of the process. .sp .LP The \fB_exithandle()\fR function is intended for use \fIonly\fR with \fB_exit()\fR, and allows for specialized processing such as \fBdldump\fR(3C) to be performed. Normal process execution should not be continued after a call to \fB_exithandle()\fR has occurred, as internal data structures may have been torn down due to \fBatexit()\fR or \fI\&.fini\fR processing. .sp .LP The symbols \fBEXIT_SUCCESS\fR and \fBEXIT_FAILURE\fR are defined in the header <\fBstdlib.h\fR> and may be used as the value of \fIstatus\fR to indicate successful or unsuccessful termination, respectively. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ MT-LevelSafe .TE .SH SEE ALSO .sp .LP \fBexit\fR(2), \fBatexit\fR(3C), \fBdldump\fR(3C), \fBattributes\fR(5), \fBstandards\fR(5)