From 51f1f5d957ca22893841a0699b148ef2a1612a75 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Tue, 16 Apr 2013 07:40:12 +0200 Subject: [PATCH] clone.2: Clarify differences between clone2() syscall and wrapper function Reported-by: Mike Frysinger Signed-off-by: Michael Kerrisk --- man2/clone.2 | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/man2/clone.2 b/man2/clone.2 index c8cfcf4fa..bab9a5e6d 100644 --- a/man2/clone.2 +++ b/man2/clone.2 @@ -989,7 +989,7 @@ On i386, should not be called through vsyscall, but directly through .IR "int $0x80" . -On ia64, a different system call is used: +On ia64, a different interface is used: .nf .BI "int __clone2(int (*" "fn" ")(void *), " @@ -999,9 +999,19 @@ On ia64, a different system call is used: ", pid_t *" ctid " */ );" .fi .PP -The +The prototype shown above is for the glibc wrapper function; +the raw system call interface has no +.I fn +or +.I arg +argument, and changes the order of the arguments so that +.I flags +is the first argument, and +.I tls +is the last argument. +.PP .BR __clone2 () -system call operates in the same way as +operates in the same way as .BR clone (), except that .I child_stack_base