]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
clone.2: Combine redundant paragraphs describing child_stack==NULL
authorMichael Kerrisk <mtk.manpages@gmail.com>
Wed, 18 Oct 2017 06:53:43 +0000 (08:53 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Wed, 18 Oct 2017 06:53:43 +0000 (08:53 +0200)
Combine two redundant paragraphs (one of which I recently
added) describing child_stack==NULL for the raw system call.
Also, make sure this text is in a more obvious place than
its previous location.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man2/clone.2

index 48e3ed88ac81bfb7aa4854f1d9066a86cd053f69..d93c4c0def7cd3dc7a046d7095845b45cb629416 100644 (file)
@@ -834,20 +834,23 @@ arguments of the
 .BR clone ()
 wrapper function are omitted.
 .PP
-Unlike the glibc wrapper function, the raw
+Another difference for the raw
 .BR clone ()
-system call permits
-.IR child_stack
-to be specified as NULL,
-with the meaning that the child uses the stack that was
-duplicated from the parent.
+system call is that the
+.I child_stack
+argument may be zero,
+in which case the child uses a duplicate of the parent's stack.
+(Copy-on-write semantics ensure that the child gets separate copies
+of stack pages when either process modifies the stack.)
+In this case, for correct operation, the
+.B CLONE_VM
+option should not be specified.
 (If the child
 .I shares
 the parent's memory because of the use of the
 .BR CLONE_VM
-flag, then chaos is likely to result if
-.I child_stack
-is specified as NULL.)
+flag,
+then no copy-on-write duplication occurs and chaos is likely to result.)
 .PP
 The order of the arguments also differs in the raw system call,
 and there are variations in the arguments across architectures,
@@ -902,15 +905,6 @@ an additional argument is supplied:
 .BI "           unsigned long " newtls );
 .EE
 .in
-.PP
-Another difference for the raw system call is that the
-.I child_stack
-argument may be zero, in which case copy-on-write semantics ensure that the
-child gets separate copies of stack pages when either process modifies
-the stack.
-In this case, for correct operation, the
-.B CLONE_VM
-option should not be specified.
 .\"
 .SS blackfin, m68k, and sparc
 .\" Mike Frysinger noted in a 2013 mail: