atexit()                 Register Exit Function
 
 #include   <stdlib.h>
 
 int        atexit(func);
 atexit_t   func;                        Function to be called
 
    atexit() registers 'func' as an "exit function".  Upon normal
    termination of the program, exit() calls '*func' just before
    returning to the operating system.  'func' is of type 'atexit_t'
    (defined in <stdlib.h>).
 
    Returns:    0 is returned on success.  If no space is left to
                register functions, a non-zero value is returned.
 
      Notes:    Each call to atexit() registers a separate exit function.
                A maximum of 32 functions can be registered. They are
                executed on a last in, first out basis.

Seealso:



This page last updated on Fri Nov 30 10:48:32 MSK 2001
Copyright © 1992-2001, Vitaly Filatov, Moscow, Russia
Webmaster