_cexit, _c_exit

Perform cleanup operations and return without terminating the process.

void _cexit( void );

void _c_exit( void );

Routine Required Header Compatibility
_cexit <process.h> Win 95, Win NT
_c_exit <process.h> Win 95, Win NT

For additional compatibility information, see Compatibility in the Introduction.

Libraries

LIBC.LIB Single thread static library, retail version
LIBCMT.LIB Multithread static library, retail version
MSVCRT.LIB Import library for MSVCRT.DLL, retail version

Return Value

None

Remarks

The _cexit function calls, in last-in-first-out (LIFO) order, the functions registered by atexit and _onexit. Then _cexit flushes all I/O buffers and closes all open streams before returning. _c_exit is the same as _exit but returns to the calling process without processing atexit or _onexit or flushing stream buffers. The behavior of exit, _exit, _cexit, and _c_exit is as follows:

Function Behavior
exit Performs complete C library termination procedures, terminates process, and exits with supplied status code
_exit Performs “quick” C library termination procedures, terminates process, and exits with supplied status code
_cexit Performs complete C library termination procedures and returns to caller, but does not terminate process
_c_exit Performs “quick” C library termination procedures and returns to caller, but does not terminate process

Process and Environment Control Routines

See Also   abort, atexit, _exec Functions, exit, _onexit, _spawn Functions, system