exit_handlers


The following program demonstrates the use of the atexit library call to register functions that libc will invoke for us upon either returning from main or calling exit. libc calls these functions in the reverse order in which we register them.

exit_handlers.c