atexit - register a function to be called at normal program
int atexit(void (*function))(void));
The atexit() function registers the given function to be
called at normal program termination, whether via exit(3) or
via return from the program's main. Functions so registered
are called in the reverse order of their registration; no
arguments are passed.
The atexit() function returns the value 0 if successful;
otherwise the value -1 is returned; errno is not set.
SVID 3, BSD 4.3, ISO 9899