Date: Tue, 31 Mar 2026 04:07:41 +0000 From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 360ff2ca4710 - stable/15 - dup(2): document the handling of filedescriptor flags Message-ID: <69cb488d.37c00.2cd16d79@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=360ff2ca47101240d34e1bf56cb788bd5ffb7c96 commit 360ff2ca47101240d34e1bf56cb788bd5ffb7c96 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2026-03-28 08:51:42 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> 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 ,home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69cb488d.37c00.2cd16d79>
