From nobody Tue Mar 31 04:07:41 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 4flF2Q0c7dz6X685 for ; Tue, 31 Mar 2026 04:07:42 +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 4flF2P5ksPz41H4 for ; Tue, 31 Mar 2026 04:07:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774930061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lV6nyM7AQdreYtDKfSaasBSCTkahgQTfmNaZyykXDGw=; b=tyUeP6EyXbLerJCnLuzhAmN0ldNzM3Bbcmx5gTRwZot04qk/Epq7NPI4JqtyZ1UADcSvTJ K/0CO/7uKPp11SL4Ru0i2hXJWiWKQc1Jr3Mq5HpbkIWWksrpHK+P6aKbN+AmFDCfT8tzL+ uuF1ndWnn3KMwaVTXCwvURtLsUaRdFIMNJI8rfsh9q9EXudwEn/D6XYOxAqK3BdLaJuDxd FOgpAUWDeP61pm8niSB64P0exdvbUWlVNDjT9vP9HNApIXmN2jDJoK1k3hnChT/UbRRwKU O9DLxywINpTUVj9ZrXeNsZF20LgN98tuR+H78iZqD1njEOfJuKdQoFX+nw2ahg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774930061; a=rsa-sha256; cv=none; b=n4lYWoZvDF0gnx0FH+5NpAdQA1L+JjWBZZr/f7bbaO3x42Y7zzhkQB/TIpCZOw740pD2F6 Es4hH58O+mXK32fsUMi78U/gsVUGhpjIcRRVh093WhU4Yq0IMRTp6YdLxlLQ/nGhxVvgL2 RNKT883VbZizsdCOYWpV67A7hnDzBuQP+3dRRhP9mN+yF4snxh6DiaeKmNWoH4VYB9ImYX rLrcaWIQF4pBBUndQQ2CdTu4iYc67G148ti+Z7+QuX2AlHKu0ZyEMJA1If6Z3oAQ1q5dg4 yw240VjnVYaJtDxd4Td7JcGGtYg4LdNGn0am0wuMiuGkTgC0kdU4/wZu6I5v/A== 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=1774930061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lV6nyM7AQdreYtDKfSaasBSCTkahgQTfmNaZyykXDGw=; b=Pol1kE3UNzGT6Xpzqd5b/GsH8K6/JH4QhCnB990JXvQvC8UdewqW7lYHjmvOiYuLFY7ak1 Wo6jF74x3KEzY3fdAGkfb5cu019S22sXmymcWc0LtXZAX/ieJsVYpjWWL0GhhIzhy9VOrQ YO0xaSPHoKLfBUq96e9WYJCSCLBdaDegiBmckRsP6nL/kdH0MHc4YSKy1NkB8adPf0CIZ6 jbAqZdzyXL5ChpClam3i6sU26CgEwNhL6PZVIgZpxsXht85AL6DC+B9u0uDl4QgyLsCnC/ L47ep2gfprxtCJFLugbQGYKeu5JAtNDObwMKeHo2ES34ta9PCu/LVPH5byPkcg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4flF2P5JV8z1CBb for ; Tue, 31 Mar 2026 04:07:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37c00 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 31 Mar 2026 04:07:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 360ff2ca4710 - stable/15 - dup(2): document the handling of filedescriptor flags 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 360ff2ca47101240d34e1bf56cb788bd5ffb7c96 Auto-Submitted: auto-generated Date: Tue, 31 Mar 2026 04:07:41 +0000 Message-Id: <69cb488d.37c00.2cd16d79@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=360ff2ca47101240d34e1bf56cb788bd5ffb7c96 commit 360ff2ca47101240d34e1bf56cb788bd5ffb7c96 Author: Konstantin Belousov AuthorDate: 2026-03-28 08:51:42 +0000 Commit: Konstantin Belousov CommitDate: 2026-03-31 04:07:17 +0000 dup(2): document the handling of filedescriptor flags (cherry picked from commit 6cc99baea607255859ee958608e4db6e2ff24793) --- lib/libc/gen/dup3.3 | 2 ++ lib/libsys/dup.2 | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/libc/gen/dup3.3 b/lib/libc/gen/dup3.3 index 338a9ae74c64..ec89ef77cf17 100644 --- a/lib/libc/gen/dup3.3 +++ b/lib/libc/gen/dup3.3 @@ -52,6 +52,8 @@ The close-on-fork flag on the new file descriptor is determined by the bit in .Fa flags . .Pp +The resolve-beneath flag on the new file descriptor is preserved. +.Pp If .Fa oldd \*(Ne diff --git a/lib/libsys/dup.2 b/lib/libsys/dup.2 index 524fd7688670..9c1e3e8d648b 100644 --- a/lib/libsys/dup.2 +++ b/lib/libsys/dup.2 @@ -81,7 +81,10 @@ object reference to the file must be obtained by issuing an additional .Xr open 2 system call. -The close-on-exec flag on the new file descriptor is unset. +The close-on-exec and close-on-fork flags on the new file descriptor +are unset. +The resolve-beneath flag on the new file descriptor is set to the same +state as on the old file descriptor. .Pp In .Fn dup2 ,