From db8ba2b4150b92953554e76f9913d98b84758056 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Wed, 24 Aug 2016 11:35:35 +1200 Subject: [PATCH] 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 Signed-off-by: Michael Kerrisk --- man2/clone.2 | 9 +++++---- 1 file 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 -- 2.39.2