.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" This code is derived from software contributed to Berkeley by
.\" Chris Torek and the American National Standards Committee X3,
.\" on Information Processing Systems.
.\" %sccs.include.redist.man%
.\" @(#)atexit.3 5.3 (Berkeley) %G%
.Nd register a function to be called on exit
.Fn atexit "void (*function)(void)"
to be called at program exit, whether via
or via return from the program's
Functions so registered are called in reverse order;
At least 32 functions can always be registered,
and more are allowed as long as sufficient memory can be allocated.
No memory was available to add the function to the list.
The existing list of functions is unmodified.