Index of Section 3 Manual Pages

Interix / SUAatexit.3Interix / SUA

atexit(3)                                                     atexit(3)

  atexit()

  NAME

    atexit() - register a function to be called on exit

  SYNOPSIS

    #include 

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

  DESCRIPTION

    The atexit(3) function registers the given function to be called at
    program exit, whether through exit(3) or through return from the program's
    main(). Functions so registered are called in reverse order; no arguments
    are passed. At least 32 functions can always be registered, and more are
    allowed as long as sufficient memory can be allocated.

  RETURN VALUES

    On success, the atexit(3) function returns 0; on failure, it returns -
    1 and sets the value of errno

  ERRORS

    atexit(3) can generate the following error:

    [ENOMEM]
        No memory was available to add the function to the list. The existing
        list of functions is unmodified.

  SEE ALSO

    exit(3)

  USAGE NOTES

    The atexit function is thread safe.

    The atexit function is not async-signal safe.


Interix / SUAHosted at SUA Community for Interix, SUA and SFUInterix / SUA