HP-UX Reference (11i v1 00/12) - 3 Library Functions A-M (vol 6)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man3/!!!intro.3c
________________________________________________________________
___ ___
a
atexit(3) atexit(3)
NAME
atexit - register a function to be called at program termination
SYNOPSIS
#include <stdlib.h>
int atexit(void (*func)(void));
DESCRIPTION
atexit() registers the function func to be called, without arguments, at normal program termination.
Functions registered by atexit() are called in reverse order of registration.
An atexit() call during exit processing is always unsuccessful.
The number of registered functions should not exceed ATEXIT_MAX as specified in <limits.h>.
When necessary, crt0() or dld.sl() (see crt0(3) and dld.sl(5)) registers one or more functions with
atexit() to allow some processing at normal program termination. This registration occurs before any
other.
RETURN VALUE
atexit() returns zero if the registration is successful; non-zero if unsuccessful.
SEE ALSO
exit(2), crt0(3), dld.sl(5).
STANDARDS CONFORMANCE
atexit(): AES, SVID3, XPG4, ANSI C
Section 3−−30 − 1 − HP-UX Release 11i: December 2000
___
___