setns.2: Clarify wording in CLONE_NEWPID discussion

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2013-01-01 04:11:15 +01:00
parent 49af76fed3
commit f16c7698e2
1 changed files with 10 additions and 7 deletions

View File

@ -80,15 +80,18 @@ and wants to ensure that the namespace is of a particular type.
if the file descriptor was opened by another process and, for example, if the file descriptor was opened by another process and, for example,
passed to the caller via a UNIX domain socket.) passed to the caller via a UNIX domain socket.)
The PID namespace is a little different. .B CLONE_NEWPID
Reassociating the calling behaves somewhat differently from the other
thread with a PID namespace only changes the PID namespace that the .I nstype
child processes will be created in. values:
reassociating the calling thread with a PID namespace only changes
Changing the PID namespace for child processes is only allowed if the the PID namespace that child processes of the caller will be created in;
it does not change the PID namespace of the caller itself.
Reassociating with a PID namespace is only allowed if the
PID namespace specified by PID namespace specified by
.IR fd .IR fd
is a child PID namespace of the PID namespace of the caller. is a descendant (child, grandchild, etc.)
PID namespace of the PID namespace of the caller.
A multi-threaded process may not change user namespace with A multi-threaded process may not change user namespace with
.BR setns (). .BR setns ().