aboutsummaryrefslogtreecommitdiffstats
path: root/man2
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2016-08-24 11:35:35 +1200
committerMichael Kerrisk <mtk.manpages@gmail.com>2016-08-24 11:47:45 +1200
commitdb8ba2b4150b92953554e76f9913d98b84758056 (patch)
treeed00dbe929eaeb64aad607867bfa4007fea2d892 /man2
parent6a459f6feec745b6a77a7829509754ef0b5dda3c (diff)
downloadman-pages-db8ba2b4150b92953554e76f9913d98b84758056.tar.gz
clone.2: Make the implications of CLONE_FILES more explicit
If CLONE_FILES is not set, the duplicated FDs nevertheless share file offset and status flags via the open file description. Reported-by: Elliott Hughes <enh@google.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man2')
-rw-r--r--man2/clone.29
1 files changed, 5 insertions, 4 deletions
diff --git a/man2/clone.2 b/man2/clone.2
index 1b3fafe010..1eeeddc0eb 100644
--- a/man2/clone.2
+++ b/man2/clone.2
@@ -192,14 +192,15 @@ If
is not set, the child process inherits a copy of all file descriptors
opened in the calling process at the time of
.BR clone ().
-(The duplicated file descriptors in the child refer to the
-same open file descriptions (see
-.BR open (2))
-as the corresponding file descriptors in the calling process.)
Subsequent operations that open or close file descriptors,
or change file descriptor flags,
performed by either the calling
process or the child process do not affect the other process.
+Note, however,
+that the duplicated file descriptors in the child refer to the same open file
+descriptions as the corresponding file descriptors in the calling process,
+and thus share file offsets and files status flags (see
+.BR open (2)).
.TP
.BR CLONE_FS " (since Linux 2.0)"
If