ATEXIT
Section: C Library Functions (3)
Index
Return to Main Contents
BSD mandoc
NAME
atexit
- register a function to be called on exit
SYNOPSIS
Fd #include <stdlib.h>
Ft int
Fn atexit void (*function)(void)
DESCRIPTION
The
Fn atexit
function
registers the given
function
to be called at program exit, whether via
exit(3)
or via 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
Rv -std atexit
ERRORS
- Bq Er ENOMEM
-
No memory was available to add the function to the list.
The existing list of functions is unmodified.
SEE ALSO
exit(3)
STANDARDS
The
Fn atexit
function
conforms to
St -ansiC .
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- RETURN VALUES
-
- ERRORS
-
- SEE ALSO
-
- STANDARDS
-
This document was created by
man2html,
using the manual pages.
Time: 15:52:50 GMT, January 15, 2023