summaryrefslogtreecommitdiffstats
path: root/man3/atexit.3
diff options
context:
space:
mode:
Diffstat (limited to 'man3/atexit.3')
-rw-r--r--man3/atexit.317
1 files changed, 8 insertions, 9 deletions
diff --git a/man3/atexit.3 b/man3/atexit.3
index 4a57ac5..4a9842b 100644
--- a/man3/atexit.3
+++ b/man3/atexit.3
@@ -11,7 +11,7 @@
.\" Modified 1993-07-24, Rik Faith (faith@cs.unc.edu)
.\" Modified 2003-10-25, Walter Harms
.\"
-.TH atexit 3 2023-07-20 "Linux man-pages 6.05.01"
+.TH atexit 3 2023-10-31 "Linux man-pages 6.7"
.SH NAME
atexit \- register a function to be called at normal process termination
.SH LIBRARY
@@ -20,7 +20,7 @@ Standard C library
.SH SYNOPSIS
.nf
.B #include <stdlib.h>
-.PP
+.P
.BI "int atexit(void (*" function )(void));
.fi
.SH DESCRIPTION
@@ -35,17 +35,17 @@ or via return from the program's
.IR main ().
Functions so registered are called in
the reverse order of their registration; no arguments are passed.
-.PP
+.P
The same function may be registered multiple times:
it is called once for each registration.
-.PP
+.P
POSIX.1 requires that an implementation allow at least
.\" POSIX.1-2001, POSIX.1-2008
.B ATEXIT_MAX
(32) such functions to be registered.
The actual limit supported by an implementation can be obtained using
.BR sysconf (3).
-.PP
+.P
When a child process is created via
.BR fork (2),
it inherits copies of its parent's registrations.
@@ -72,7 +72,6 @@ T{
.BR atexit ()
T} Thread safety MT-Safe
.TE
-.sp 1
.SH VERSIONS
POSIX.1 says that the result of calling
.\" POSIX.1-2001, POSIX.1-2008
@@ -102,14 +101,14 @@ Functions registered using
.BR on_exit (3))
are not called if a process terminates abnormally because
of the delivery of a signal.
-.PP
+.P
If one of the registered functions calls
.BR _exit (2),
then any remaining functions are not invoked,
and the other process termination steps performed by
.BR exit (3)
are not performed.
-.PP
+.P
The
.BR atexit ()
and
@@ -118,7 +117,7 @@ functions register functions on the same list:
at normal process termination,
the registered functions are invoked in reverse order
of their registration by these two functions.
-.PP
+.P
According to POSIX.1, the result is undefined if
.BR longjmp (3)
is used to terminate execution of one of the functions registered using