From nobody Sat Mar 28 09:09:45 2026 X-Original-To: dev-commits-src-main@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 4fjWtK1XZpz6WBFx for ; Sat, 28 Mar 2026 09:09:45 +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 4fjWtK0mn3z4FN9 for ; Sat, 28 Mar 2026 09:09:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774688985; 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=57BDDgmqId9PiSvUBOchaRHdC7o3gyXitQ8K00J7SCY=; b=WpQng0eobrAnJruMj+Kdq/9q746QiOSA8WBRNgEttCidTwScONXwsFOV3l3p+LT0O6EhPR QIlCi9STOyZJMoZEQWHDyFXY7bQ5M/9bUivhBDHYWKm9+z2TdD3dXejImJh5ip4fAYILCa 7NbnvsxqGnFFUdxS3w7M2Hqg5M4iQBxv5aSPKr9LEIWI/MGCQPzIsoetvfYSaVW2TsmXSD 5iqou2f26ib42r5HAVjHtd0KxJ3ivmOTFAS+izuciCkWVz8yii4jHSNA0KlyALwU/Gpsm5 6r9yEp7PsqUfzLJNoj4cyWmqgRRGpyG7rCmqixpO1ZPXQlAQUwOzrHjWk51BJA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774688985; a=rsa-sha256; cv=none; b=lBnQRYHeA7oF4hq3nLZ4HIvlcu42UpcRB7iibw2YT1FD553dzHrZvUdSUyztsOym68vq8B 0f/vvvtGkxA2cgNn8r860Al2O8MHnqKhbpN/khEQFH9DqfcJMUK2a65Ak4EmPGSpWejAda IxPnacct1wOKjn5N+KjBnTRFPS326RR4sHoYqcMUvD3TBPXnNvI76f2MuwPXXDo9PRL+mc HiKUYdkbt/z5kBBc7o2tYmmkn0tZ1XGF0Du70dCBD5Xxepji0Zq02fi+rMyqe1s1S/IxNM pShdgOWCGfz5cv7xeM+pKMorODAKH0H9A+JUGIg2ANTaXcJKHrwAJEKBVUmCBQ== 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=1774688985; 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=57BDDgmqId9PiSvUBOchaRHdC7o3gyXitQ8K00J7SCY=; b=KQ6wvHfvJ22M2r4ero9ff5sA1PZKH3bIt6opSVeqIJp8swzjIPolGqaPostvVbYanLwMrY LsPjUpwy6cvYnIJZlly/n2eNs+Yw1s0+1RbuzCBZsWBLH5X//5Qy6pQKiwTZZOpXoA2HXj IaT9A7OFIXeh3SGgU6j5BhjQspVJFYsp6+EpJHIks3Xsvl/hUbdsIAJqeAHv89SmHVM0vG MA6j8iHs1S9R2LzipQhYR2pn96dscE8+XIwwdLz1mAkEtb9Fz8RYprqmOwFW9MpjSJbo+v de/+NUzvjMbmdZcQemQDWTXTTSj//2evbQvom6mFGI8PTGfJeEJ6WawyQPiqFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fjWtK0MzHz45q for ; Sat, 28 Mar 2026 09:09:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2508e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 28 Mar 2026 09:09:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 6cc99baea607 - main - dup(2): document the handling of filedescriptor flags List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 6cc99baea607255859ee958608e4db6e2ff24793 Auto-Submitted: auto-generated Date: Sat, 28 Mar 2026 09:09:45 +0000 Message-Id: <69c79ad9.2508e.336a7876@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6cc99baea607255859ee958608e4db6e2ff24793 commit 6cc99baea607255859ee958608e4db6e2ff24793 Author: Konstantin Belousov AuthorDate: 2026-03-28 08:51:42 +0000 Commit: Konstantin Belousov CommitDate: 2026-03-28 09:09:09 +0000 dup(2): document the handling of filedescriptor flags Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential revision: https://reviews.freebsd.org/D56121 --- 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 ,