NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | ATTRIBUTES | SEE ALSO
#include <stdlib.h>int atexit(void (*func)(void));
The atexit() function registers the function pointed to try func a list of functions to be called without arguments on normal termination of the program. Normal termination occurs by either a call to the exit(3C) function or a return from main(). At most 32 functions may be registered by atexit(); the functions will be called in the reverse order of their registration.
The atexit() function returns 0 if the registration succeeds. Otherwise it returns -1.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
MT-Level | Safe |
NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | ATTRIBUTES | SEE ALSO