atexit(3C) — COMPATIBILITY FUNCTIONS
NAME
atexit − add program termination routine
SYNOPSIS
#include <stdlib.h>
int atexit(void (∗func)(void));
DESCRIPTION
atexit() adds the function func() to 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() function or a return from main(). The functions will be called in the reverse order of their registration.
RETURN VALUES
atexit() returns 0 if the registration succeeds, nonzero if it fails.
SEE ALSO
NOTES
The unbundled ANSI C compiler provides ANSI versions of most of the system header files, which are used automatically at compile time. For example, the directive
#include <stdio.h> will use the file provided by this compiler, rather than /usr/include/stdio.h.
Sun Release 4.1 — Last change: 21 June 1994