Manpage of EXIT
EXIT
Section: NEWLIB (3)
Updated: 2005 Feb 23
Index
Return to Main Contents
NAME
1.16 `exit'--end program execution
SYNOPSIS
#include <stdlib.h>
void exit(int CODE);
DESCRIPTION
Use `exit' to return control from a program to the host operating
environment. Use the argument CODE to pass an exit status to the
operating environment: two particular values, `EXIT_SUCCESS' and
`EXIT_FAILURE', are defined in ``stdlib.h'' to indicate success or
failure in a portable fashion.
`exit' does two kinds of cleanup before ending execution of your
program. First, it calls all application-defined cleanup functions you
have enrolled with `atexit'. Second, files and streams are cleaned up:
any pending output is delivered to the host system, each open file or
stream is closed, and files created by `tmpfile' are deleted.
RETURNS
`exit' does not return to its caller.
PORTABILITY
ANSI C requires `exit', and specifies that `EXIT_SUCCESS' and
`EXIT_FAILURE' must be defined.
Supporting OS subroutines required: `_exit'.
SEE ALSO
exit
is part of the
libc
library.
The full documentation for
libc
is maintained as a Texinfo manual. If
info
and
libc
are properly installed at your site, the command
-
info libc
will give you access to the complete manual.
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- RETURNS
-
- PORTABILITY
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 21:25:16 GMT, May 16, 2005
www.fiveanddime.net