HP C/iX Library Reference Manual (30026-90004)
Chapter 5 111
HP C/iX Library Function Descriptions
atexit
atexit
Specifies a function to call when a program terminates.
Syntax
#include <stdlib.h>
int atexit (void (*
func
) (void));
Parameters
func
A pointer to a function to be registered.
Return Values
0 The function is successfully registered.
≠0 An error occurred.
Description
The atexit function registers a function pointed to by
func
that will be called at normal
program termination. The function is called without arguments. Up to 32 functions can be
registered.
See Also
exit(), ANSI C 4.10.4.2