Guardian C Library Calls Reference Manual

Reference to Library Calls
Guardian TNS C Library Calls Reference Manual128833 3-9
atexit
atexit
The atexit function registers a function for the run-time library to call at normal program
termination.
function(void)
points to the function you want to register for execution at normal program
termination.
Return Value
is zero if atexit successfully registers the function; otherwise, atexit returns a
nonzero value.
Usage Guidelines
Several constraints apply to a function you register:
The function cannot return a value.
The function cannot require parameters.
The function cannot call exit or atexit.
You can use atexit to register up to 32 functions for the run-time library to call at
normal program termination.
#include <stdlibh>
int atexit(void (*function)(void));