Terminates execution of the current program.
void _exit (int value);
void exit (int value);
Required Header |
<stdlib.h> |
Return Value
None.
Parameters
value
The value to pass back to the operating system
Remarks
The _exit function terminates execution and passes the return value back to the operating system, which in turn may pass to an invoking program.
A thread other than the main thread calling exit, will funnel through to _endthread instead, and will not terminate the entire program.In ANSI C, exit and _exit are different, where _exit does not release any system resources - however, the JCC library uses the same routine in both cases except for the following:
The list of registered atexit functions is executed only when exit is called or the main function returns.