From nobody Fri Apr 10 18:31:24 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fslkP1KfVz6YBN3 for ; Fri, 10 Apr 2026 18:31:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fslkN5jBZz42hS for ; Fri, 10 Apr 2026 18:31:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775845884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A40b+JzT1tUiNRkQUR7J1e9RJoixDDl/ZE+3cXlUBEE=; b=xAwjb8eYdiF6VsklCh/Duux8FvPDMvPoYI6Swtdkq3eSeI7v4J+y8VEfw0XPTgG+II5vxz UFDua4e4OgZQaXKbe/EonIxkUc2dSyU+SJ03xceYgXyWSlY5D/I8GiU8gyoHBlRD7qEzoX o3QfDOok9lhnWeVeHEmERlvcxnE2sD2O7uI4iBwLf5eVLvANh8EiekPvt5q+6DGcDFeoGf cJbmHmFqk0pZvnQRDdDY1aMQ/EQwJPY3rn/+uaoJJVLYQuxgqtBQLlJ9ZNYlQUMLfgiclu B7MXX9fQCwU/ehEyVpZVcaJQ3t5c45l7Nb23BapAK+eT69hdfj/LlCtUJXwioQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775845884; a=rsa-sha256; cv=none; b=KEBE5vXQmTbMuUE1gAApCzP5l/bI6l5XymI8enME1vmOkyS3J/doti8URSJ8L4hBs0e8XH iyIOhmJicggrsi8jn3cEtuExHJpV5pwIqSSKAh5Tin1mM1FtEsow1/uAnymb7JvPTHyPP0 k2B077gxSlxjjbEWFQFJJi8XygikhPcySHGz2Bc7ohw3LzTyxHyB0D0YH4DD1jPJvSdTTR gGfs3uEKFfFuw5w76ofWwpOE0VkT8xPlPnbmXPBth7CucR1391eUFDx4azr8x+tIHIyaJB G74MvP95aAGhdcHStFWnWMxdyfavke1MhzhULyCedhghcBxISrX5bbTZAlDOdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775845884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A40b+JzT1tUiNRkQUR7J1e9RJoixDDl/ZE+3cXlUBEE=; b=rtaWM2jk9B0o99heDxPcg/LVO6xGstNEESw3116lx7CTiKnr9rH1xI3bjjg5/EZ+ha8VnR XezvOoXKauJivhRO9UhMmIQs1z15h+Tj3ULK6sdqDUdjuEaDPFBdZaPTF+8X/X7g0VeFSZ gMUW1Vbk5JwTUmrV12SEiADjTz/k56gnhURQxeL+kxfJz7gjp8JOf4zhhJRw1yr+NWKIlY /9IXdpA6nsGFOQJrhv/E4ONbmBnWII4COJdre5Ol9HT/bJcYX4Y3rVbsA4PbIYzXw4VIvt 4CpMmFavBklPKC1gIqzjqb9Cu0j8jD4VbmmGNcbSHHu9ELCP8kk5BsqwJzj5tw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fslkN56jDzw11 for ; Fri, 10 Apr 2026 18:31:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38e18 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Apr 2026 18:31:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Artem Bunichev From: Alexander Ziaee Subject: git: 20bbad13f247 - stable/15 - _exit.2: Cross-reference atexit(3) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 20bbad13f24744e86cbef02b1e3e3475abec6a71 Auto-Submitted: auto-generated Date: Fri, 10 Apr 2026 18:31:24 +0000 Message-Id: <69d941fc.38e18.1ebe21b0@gitrepo.freebsd.org> The branch stable/15 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=20bbad13f24744e86cbef02b1e3e3475abec6a71 commit 20bbad13f24744e86cbef02b1e3e3475abec6a71 Author: Artem Bunichev AuthorDate: 2026-03-31 17:09:00 +0000 Commit: Alexander Ziaee 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 STANDARDS