clone.2: Rework the discussion of the historical CLONE_PID for clarity

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2017-10-18 08:37:46 +02:00
parent 2551f80148
commit 1c173eb337
1 changed files with 6 additions and 4 deletions

View File

@ -519,17 +519,18 @@ The store operation completes before
.BR clone () .BR clone ()
returns control to user space. returns control to user space.
.TP .TP
.BR CLONE_PID " (obsolete)" .BR CLONE_PID " (Linux 2.0 to 2.5.15)"
If If
.B CLONE_PID .B CLONE_PID
is set, the child process is created with the same process ID as is set, the child process is created with the same process ID as
the calling process. the calling process.
This is good for hacking the system, but otherwise This is good for hacking the system, but otherwise
of not much use. of not much use.
Since 2.3.21 this flag can be From Linux 2.3.21 onward, this flag could be
specified only by the system boot process (PID 0). specified only by the system boot process (PID 0).
It disappeared in Linux 2.5.16. The flag disappeared completely from the kernel sources in Linux 2.5.16.
Since then, the kernel silently ignores it without error. Since then, the kernel silently ignores this bit if it is specified in
.IR flags .
.TP .TP
.BR CLONE_PTRACE " (since Linux 2.2)" .BR CLONE_PTRACE " (since Linux 2.2)"
If If
@ -1130,6 +1131,7 @@ was specified by an unprivileged process (process without \fBCAP_SYS_ADMIN\fP).
.B EPERM .B EPERM
.B CLONE_PID .B CLONE_PID
was specified by a process other than process 0. was specified by a process other than process 0.
(This error occurs only on Linux 2.5.15 and earlier.)
.TP .TP
.B EPERM .B EPERM
.BR CLONE_NEWUSER .BR CLONE_NEWUSER