Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Aug 2021 12:39:31 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: c4bb20a5ec87 - stable/13 - _Exit(3): document implementation
Message-ID:  <202108121239.17CCdVGN059046@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=c4bb20a5ec876fb44e152c5773b7104e4c753dec

commit c4bb20a5ec876fb44e152c5773b7104e4c753dec
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-08-05 16:04:44 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2021-08-12 12:37:54 +0000

    _Exit(3): document implementation
    
    (cherry picked from commit ee62fb2e1e14eab35d4e4e92535bcac9fc91eeb8)
---
 lib/libc/stdlib/exit.3 | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/lib/libc/stdlib/exit.3 b/lib/libc/stdlib/exit.3
index 9c2b79b72956..ff7a67ffcb85 100644
--- a/lib/libc/stdlib/exit.3
+++ b/lib/libc/stdlib/exit.3
@@ -32,7 +32,7 @@
 .\"     @(#)exit.3	8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd March 22, 2020
+.Dd August 5, 2021
 .Dt EXIT 3
 .Os
 .Sh NAME
@@ -58,17 +58,17 @@ Before termination,
 performs the following functions in the order listed:
 .Bl -enum -offset indent
 .It
-Call the functions registered with the
+Call all functions registered with the
+.Xr __cxa_atexit 3
+function
+(which are typically destructors from the loaded dynamic objects),
+and the functions registered with the
 .Xr atexit 3
 function, in the reverse order of their registration.
 .It
 Flush all open output streams.
 .It
 Close all open streams.
-.It
-Unlink all files created with the
-.Xr tmpfile 3
-function.
 .El
 .Pp
 The
@@ -76,6 +76,14 @@ The
 function terminates without calling the functions registered with the
 .Xr atexit 3
 function, and may or may not perform the other actions listed.
+The
+.Fx
+implementation of the
+.Fn _Exit
+function does not call destructors registered with
+.Xr __cxa_atexit 3,
+does not flush buffers, and does not close streams.
+.Pp
 Both functions make the low-order eight bits of the
 .Fa status
 argument available to a parent process which has called a



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202108121239.17CCdVGN059046>