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:
Michael Kerrisk 2013-03-04 23:56:47 +01:00
parent 7cd5151990
commit e0fd534919
1 changed files with 11 additions and 4 deletions

View File

@ -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.
.\"
.\" ============================================================
.\"