mirror of https://github.com/mkerrisk/man-pages
pid_namespaces.7: Rework text on threads and CLONE_NEWPID
Adapted text from Eric Biederman. Reported-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
7cd5151990
commit
e0fd534919
|
@ -208,6 +208,9 @@ the parent of a process is either in the same namespace
|
|||
or resides in the immediate parent PID namespace.
|
||||
|
||||
Every thread in a process must be in the same PID namespace.
|
||||
.\" FIXME It's not really explained WHY this is so.
|
||||
.\" I suspect part of the problem here is terminology. Is
|
||||
.\" "thread" really the term needed here?
|
||||
For this reason, the following call sequences will fail (with the error
|
||||
.BR EINVAL ):
|
||||
|
||||
|
@ -229,12 +232,16 @@ The point here is that
|
|||
.BR unshare (2)
|
||||
and
|
||||
.BR setns (2)
|
||||
change the PID namespace for processes subsequently created by the caller,
|
||||
but not for the calling process,
|
||||
while
|
||||
change the PID namespace that will be used in all subsequent calls to
|
||||
.BR clone (2)
|
||||
and
|
||||
.BR fork (2),
|
||||
but do not change the PID namespace of the calling process.
|
||||
Because a subsequent
|
||||
.BR clone(2)
|
||||
.BR CLONE_VM
|
||||
specifies the creation of a new thread in the same process.
|
||||
would imply the creation of a new thread in a different PID namespace,
|
||||
the operation is not permitted.
|
||||
.\"
|
||||
.\" ============================================================
|
||||
.\"
|
||||
|
|
Loading…
Reference in New Issue