[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
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.

See Also: exec...() exit() spawn...()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson