aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2026-03-28 08:51:42 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2026-03-28 09:09:09 +0000
commit6cc99baea607255859ee958608e4db6e2ff24793 (patch)
treef8389b869650b5e1b665851963d326d6e14595b1 /lib
parentc8d40bf8ecc60cc15e3904410db62065ea681fdc (diff)
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/dup3.32
-rw-r--r--lib/libsys/dup.25
2 files changed, 6 insertions, 1 deletions
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 ,