Registers a callback function to be executed when the program exits.
int atexit (void (func)(void));
Required Header |
<stdlib.h> |
Return Value
This function returns zero if successful, or non-zero if the callback could not be registered.
Parameters
func
The function address of the callback routine
Remarks
The atexit function registers the callback function func to be executed when the program has finished execution. Successive calls to atexit create a last-in-first-out queue of functions to be executed when the program terminates.
The JCC library allows up to 5 functions to be registered.