Register an exit function.
int __fastcall__ atexit (void (*exitfunc) (void));
atexitregisters the function pointed to by
exitfuncas an exit function. Exit functions are called when the program terminates, they are called in LIFO order (the last function registered is called first).
atexitreturns zero on success and a nonzero value on failure.
- A maximum of 5 exit functions can be registered.
- There is no way to unregister an exit function.
- The function is only available as fastcall function, so it may only be used in presence of a prototype.
- See also