- Function
Register an exit function.
- Header
- Declaration
int __fastcall__ atexit (void (*exitfunc) (void));
- Description
atexit
registers the function pointed to byexitfunc
as an exit function. Exit functions are called when the program terminates, they are called in LIFO order (the last function registered is called first).atexit
returns zero on success and a nonzero value on failure.- Limits
- 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.
- Availability
ISO 9899
- See also
- Example
None.