#include <stdlib.h>
|
void
exit (int status); |
void
_Exit (int status); |
Before termination, exit performs the following functions in the order listed:
The _Exit function terminates without calling the functions registered with the atexit function, and may or may not perform the other actions listed. Both functions make the low-order eight bits of the status argument available to a parent process which has called a wait function.
The C Standard (-isoC-99) defines the values 0, EXIT_SUCCESS, and EXIT_FAILURE as possible values of status. Cooperating processes may use other values.
Note that exit does nothing to prevent bottomless recursion should a function registered using atexit itself call exit. Such functions must call _Exit instead (although this has other effects as well which may not be desired).
/** * Detailed description : Sample usage of exit system call. **/ #include <stdlib.h> void main() { exit(0) ; //Here 0 is exit status of the process }
© 2005-2007 Nokia |