aboutsummaryrefslogtreecommitdiffstats
path: root/man7/pid_namespaces.7
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2013-03-01 09:32:51 +0100
committerMichael Kerrisk <mtk.manpages@gmail.com>2014-09-13 20:16:00 -0700
commit805685dc1b381091a75402d334fec2e660e69290 (patch)
tree5032249cb70d1a5080a6da3f8645705945cafc9d /man7/pid_namespaces.7
parentec411de6d5b71c82751fd57b164c15d5f2381db6 (diff)
downloadman-pages-805685dc1b381091a75402d334fec2e660e69290.tar.gz
pid_namespaces.7: Note the shell command used for mount procfs
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man7/pid_namespaces.7')
-rw-r--r--man7/pid_namespaces.718
1 files changed, 13 insertions, 5 deletions
diff --git a/man7/pid_namespaces.7 b/man7/pid_namespaces.7
index 12f690c4fe..575c58f890 100644
--- a/man7/pid_namespaces.7
+++ b/man7/pid_namespaces.7
@@ -224,7 +224,7 @@ the calling thread.
.\"
.\" ============================================================
.\"
-.SS Miscellaneous
+.SS /proc and PID namespaces
After creating a new PID namespace,
it is useful for the child to change its root directory
and mount a new procfs instance at
@@ -232,8 +232,13 @@ and mount a new procfs instance at
so that tools such as
.BR ps (1)
work correctly.
-.\" mount -t proc proc /proc
-(If a new mount namespace is simultaneously created by including
+From a shell, the command to mount
+.I /proc
+is:
+
+ $ mount -t proc proc /proc
+
+If a new mount namespace is simultaneously created by including
.BR CLONE_NEWNS
in the
.IR flags
@@ -243,7 +248,7 @@ or
.BR unshare (2)),
then it isn't necessary to change the root directory:
a new procfs instance can be mounted directly over
-.IR /proc .)
+.IR /proc .
Calling
.BR readlink (2)
@@ -251,7 +256,10 @@ on the path
.I /proc/self
yields the process ID of the caller in the PID namespace of the procfs mount
(i.e., the PID namespace of the process that mounted the procfs).
-
+.\"
+.\" ============================================================
+.\"
+.SS Miscellaneous
When a process ID is passed over a UNIX domain socket to a
process in a different PID namespace (see the description of
.B SCM_CREDENTIALS