Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
Guardian Native C Library Calls (a - e) atexit(3)
NAME
atexit - Provides for cleanup on process termination
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL
G-series native OSS processes: /G/system/sysnn/zcrtlsrl
H-series and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCREDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcredll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycredll
SYNOPSIS
#include <stdlib.h>
int atexit(
void (*function) (void));
PARAMETERS
function Points to a function that is called at normal process termination for cleanup pro-
cessing. A push-down stack of functions is kept, such that the last function
registered is the first function called. Any function that is registered more than
once will be repeated. Up to ATEXIT_MAX functions can be specified with
atexit().
DESCRIPTION
The atexit() function registers functions to be called at normal process termination for cleanup
processing.
RETURN VALUES
The atexit() function returns the value 0 (zero) if successful, and a nonzero value if there has
been an attempt to register more exit() functions than can be held in the atexit() array.
RELATED INFORMATION
Functions: _exit(2), exit(3), sigaction(2), times(3), wait(2).
527192-018 Hewlett-Packard Company 1−47