69,373
社区成员
发帖
与我相关
我的任务
分享
#include <stdlib.h>
void exit(int status);
DESCRIPTION
The exit() function causes normal process termination and the value of
status & 0377 is returned to the parent (see wait(2)).
All functions registered with atexit() and on_exit() are called, in the
reverse order of their registration. (It is possible for one of these
functions to use atexit() or on_exit() to register an additional function
to be executed during exit processing; the new registration is added to
the front of the list of functions that remain to be called.)
All open streams are flushed and closed. Files created by tmpfile() are
removed.
The C standard specifies two constants, EXIT_SUCCESS and EXIT_FAILURE,
that may be passed to exit() to indicate successful or unsuccessful ter-
mination, respectively.
RETURN VALUE
The exit() function does not return.
CONFORMING TO
SVr4, 4.3BSD, POSIX.1-2001.