diff options
| author | Mike Frysinger <vapier@gentoo.org> | 2016-10-06 13:23:22 -0400 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2016-10-07 11:17:01 +0200 |
| commit | 2b3122418d6ae1c539ecb66fd9d469ec69d8dacd (patch) | |
| tree | ae7b9acbc093ef969aad7c1ca50e3c51257b8025 /man5/proc.5 | |
| parent | fdcc06eeb12fcc6288e97c016a50d1a0e728d899 (diff) | |
| download | man-pages-2b3122418d6ae1c539ecb66fd9d469ec69d8dacd.tar.gz | |
proc(5): Clarify the root symlink and mount namespaces
If the target process is in a different mount namespace, the root
symlink actually shows that view of the filesystem. As an example:
/* Terminal 1 */
$ unshare -Urnm
# mount -t tmpfs tmpfs /etc
# mount --bind /bin /dev
# echo $$
17168
/* Terminal 2 */
# ls /etc # Normal view of /etc files.
# ls /proc/17168/root/etc # Empty view of the tmpfs.
# ls /dev # Normal view of /dev files.
# ls /proc/17168/root/dev # Contents of /bin files.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'man5/proc.5')
| -rw-r--r-- | man5/proc.5 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/man5/proc.5 b/man5/proc.5 index 3a5f4407c6..0680902c54 100644 --- a/man5/proc.5 +++ b/man5/proc.5 @@ -1513,6 +1513,10 @@ root directory, and behaves in the same way as and .IR fd/* . +Note however that this file is not merely a symlink. +It provides the same view of the filesystem (including namespaces and the +set of per-process mounts) as the process itself. + .\" The following was still true as at kernel 2.6.13 In a multithreaded process, the contents of this symbolic link are not available if the main thread has already terminated |
