aboutsummaryrefslogtreecommitdiffstats
path: root/man7/pid_namespaces.7
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2013-03-01 10:50:09 +0100
committerMichael Kerrisk <mtk.manpages@gmail.com>2014-09-13 20:16:00 -0700
commit47832b6dfcbab9c86b564dc8275cd8032e60aab4 (patch)
tree78a90c79d54d0a70c77b767651a8d6feb9503ae5 /man7/pid_namespaces.7
parent837ddeb9695eed6f40a967bb9f33de3d506eaccc (diff)
downloadman-pages-47832b6dfcbab9c86b564dc8275cd8032e60aab4.tar.gz
pid_namespaces.7: Clarify text on failure cases with CLONE_VM + multithreaded
Reported-by: Rob Landley <rob@landley.net> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man7/pid_namespaces.7')
-rw-r--r--man7/pid_namespaces.713
1 files changed, 8 insertions, 5 deletions
diff --git a/man7/pid_namespaces.7 b/man7/pid_namespaces.7
index 97c4fd6f15..5ef19a9265 100644
--- a/man7/pid_namespaces.7
+++ b/man7/pid_namespaces.7
@@ -199,7 +199,8 @@ 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.
-For this reason, the following call sequences will fail:
+For this reason, the following call sequences will fail (with the error
+.BR EINVAL ):
.nf
unshare(CLONE_NEWPID);
@@ -215,14 +216,16 @@ For this reason, the following call sequences will fail:
setns(fd, CLONE_NEWPID); /* Fails */
.fi
-Because the above
+The point here is that
.BR unshare (2)
and
.BR setns (2)
-calls only change the PID namespace for created children, the
+change the PID namespace for processes subsequently created by the caller,
+but not for the calling process,
+while
.BR clone (2)
-calls necessarily put the new thread in a different PID namespace from
-the calling thread.
+.BR CLONE_VM
+specifies the creation of a new thread in the same process.
.\"
.\" ============================================================
.\"