Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Mar 2026 17:16:32 +0000
From:      Alexander Ziaee <ziaee@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Cc:        Artem Bunichev <tembun@bk.ru>
Subject:   git: c082e5656417 - main - _exit.2: Cross-reference atexit(3)
Message-ID:  <69cc0170.41da3.180fe0ca@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by ziaee:

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

commit c082e5656417945bfa567114c60969844f3d7bdf
Author:     Artem Bunichev <tembun@bk.ru>
AuthorDate: 2026-03-31 17:09:00 +0000
Commit:     Alexander Ziaee <ziaee@FreeBSD.org>
CommitDate: 2026-03-31 17:13:02 +0000

    _exit.2: Cross-reference atexit(3)
    
    atexit(3) is one of the cases when _exit(2) must be used instead of
    exit(3).
    
    MFC after:              3 days
    Reviewed by:            mhorne, ziaee
    Differential Revision:  https://reviews.freebsd.org/D54467
---
 lib/libc/stdlib/atexit.3 | 3 ++-
 lib/libsys/_exit.2       | 9 +++++----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/lib/libc/stdlib/atexit.3 b/lib/libc/stdlib/atexit.3
index 4ff384813550..4082c887497c 100644
--- a/lib/libc/stdlib/atexit.3
+++ b/lib/libc/stdlib/atexit.3
@@ -29,7 +29,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd September 6, 2002
+.Dd March 31, 2026
 .Dt ATEXIT 3
 .Os
 .Sh NAME
@@ -90,6 +90,7 @@ function was called by a program that did not supply a
 implementation.
 .El
 .Sh SEE ALSO
+.Xr _exit 2 ,
 .Xr at_quick_exit 3 ,
 .Xr exit 3
 .Sh STANDARDS
diff --git a/lib/libsys/_exit.2 b/lib/libsys/_exit.2
index 6f038f79f6ea..6e46e65ac86e 100644
--- a/lib/libsys/_exit.2
+++ b/lib/libsys/_exit.2
@@ -25,7 +25,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd September 8, 2016
+.Dd March 31, 2026
 .Dt EXIT 2
 .Os
 .Sh NAME
@@ -95,9 +95,9 @@ and all current access to the controlling terminal is revoked.
 .Pp
 Most C programs call the library routine
 .Xr exit 3 ,
-which flushes buffers, closes streams, unlinks temporary files, etc.,
-before
-calling
+which flushes buffers, closes streams, unlinks temporary files, invokes
+.Xr atexit 3
+handlers, etc., before calling
 .Fn _exit .
 .Sh RETURN VALUES
 The
@@ -108,6 +108,7 @@ can never return.
 .Xr fork 2 ,
 .Xr sigaction 2 ,
 .Xr wait 2 ,
+.Xr atexit 3 ,
 .Xr exit 3 ,
 .Xr init 8
 .Sh STANDARDS


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69cc0170.41da3.180fe0ca>