_cexit, _c_exit

Description

Perform cleanup operations and return without terminating the process.

#include <process.h>

void _cexit( void );

void _c_exit( void );

Remarks

The _cexit function calls, in LIFO (“last in, first out”) order, the functions registered by atexit and _onexit. Then the _cexit function flushes all I/O buffers and closes all open streams before returning.

The _c_exit function is the same as the _exit function but returns to the calling process without processing atexit or _onexit or flushing stream buffers.

The behavior of the exit, _exit, _cexit, and _c_exit functions is described in the following list:

Function Action

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

Return Value

None.

Compatibility

Standards:None

16-Bit:DOS, QWIN, WIN, WIN DLL

32-Bit:DOS32X

See Also

abort, atexit, _exec functions, exit, _onexit, _spawn functions, system