Date: Fri, 10 Apr 2026 18:31:24 +0000 From: Alexander Ziaee <ziaee@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Artem Bunichev <tembun@bk.ru> Subject: git: 20bbad13f247 - stable/15 - _exit.2: Cross-reference atexit(3) Message-ID: <69d941fc.38e18.1ebe21b0@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=20bbad13f24744e86cbef02b1e3e3475abec6a71 commit 20bbad13f24744e86cbef02b1e3e3475abec6a71 Author: Artem Bunichev <tembun@bk.ru> AuthorDate: 2026-03-31 17:09:00 +0000 Commit: Alexander Ziaee <ziaee@FreeBSD.org> CommitDate: 2026-04-10 18:30:21 +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 (cherry picked from commit c082e5656417945bfa567114c60969844f3d7bdf) --- 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 STANDARDShome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69d941fc.38e18.1ebe21b0>
