From nobody Tue Mar 31 04:07:41 2026 X-Original-To: dev-commits-src-all@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 4flF2W1shdz6X63C for ; Tue, 31 Mar 2026 04:07:47 +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 4flF2W086kz41DL for ; Tue, 31 Mar 2026 04:07:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774930067; 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=MTMfyAANgt3TZIgRiNA2OmQV8xaD5qq/Ef5zqmL4br5g8sAJmrWPCe3Hk3s/e6pNEVNT6N Hi8bngxy+LTBhOlK/Sj9/q1kdGMWsSFuDanc3GNWJcSCjEHWOU3DIlDqs+sFpinE2XIwJx AASO2T4z67c9bNguXnrb9tcWEx0p0tDJANmjDeKIooGBGZ0LOB9+uoG+77WMAyW6j3uvsU sodbQEosIZDAxL+Y1oh0+ZJtHrm1E4UxsXZBoOGvE0R6d4SwwmOl0v/gXFxSP4zTs1nevs 5yYbWzIkY6JDDktGqwbzPbocq1Yv6zqG670cXI+TfMyc1Jncp3MRi4O7WzR6Hg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774930067; a=rsa-sha256; cv=none; b=SNNMRqm2NyJMl15HUnKQMp9/oUalKMo6R5zHZ7jJg28qkNRUBxz6cp1XVum42EJG17oLEt P+AP8/v7BHbD+hgS2A2Ms8aQQRjtwqhFMFKhf462IWokUc4FmcUaYogSr/Aa4uEpO3Hgmq nE+axh1AFsETKmZErX2ATX9f8sTHQklU2tYevIucP546cJNLPzrLRmZ5HM5ssNYlhYnI+O jvxbXpRslS5RbSDmSXBJlNT/B2GVURkBtX77AVNTctkqaZL0jZMUnpAieQbFHkCrCIgwEE rkuOdrAkmymYD+XOB3jwX8zxGL/VgdZ3EhOM268G6WdE89UyyAkdK95zWHcIZA== 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=1774930067; 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=stWOl7VfTg8oheIMzBrvvijJmM831lerhQeUIIzCSjANOmZrOAK9erOGqbKZyq8Gt0Km97 sGkqvV8hMp/cs+T/1Z+npF10JGBXqktZP5hQY5Hov2M1n4nztZPck9XL3OLuEjGfA9DfEs QvFrZQhqz7FhnwXrW5TIzAb0z0DxarVpJZI2aZabE6zjH7tWRay12CkrhO7oRJRNK18D8w 5hfaAhyudsSfPdYU+/wslR2Au9CFauQ23bMJnb2+QP2O/XJBPZ+Q/04EAMSjyLKW9EQxxE JJCtBTWtwoirdaPlmpjAo35dwNGGSaCBnTk1zwBmNmK4UaC/MtAHV3fIDXBBag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4flF2V6pQqz1C6r for ; Tue, 31 Mar 2026 04:07:46 +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: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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 ,