atexit
ATEXIT(T)           Linux Programmer's Manual           ATEXIT(T)



NAME
       atexit  -  register a function to be called at normal pro-
       gram termination.

SYNOPSIS
       #include <stdlib.h>

       int atexit(void (*function)(void));

DESCRIPTION
       The atexit() function registers the given function  to  be
       called  at normal program termination, whether via exit(t)
       or via return from the program's main.  Functions so  reg-
       istered are called in the reverse order of their registra-
       tion; no arguments are passed.

RETURN VALUE
       The atexit() function returns the value 0  if  successful;
       otherwise it returns a nonzero value; errno is not set.

CONFORMING TO
       SVID 3, BSD 4.3, ISO 9899

SEE ALSO
       exit(t), on_exit(t)



GNU                         1997-09-14                  ATEXIT(T)