aboutsummaryrefslogtreecommitdiffstats
path: root/man7/namespaces.7
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2013-01-14 01:01:21 +0100
committerMichael Kerrisk <mtk.manpages@gmail.com>2014-09-13 20:15:57 -0700
commit357002ecdf29fcaa1fdb6e0231bb9f2309204bcb (patch)
treed25957f8a3a4313ff170a9552145fea6518d735b /man7/namespaces.7
parent020357e8e4bb80621421a55650749cd26eec42c8 (diff)
downloadman-pages-357002ecdf29fcaa1fdb6e0231bb9f2309204bcb.tar.gz
proc.5, namespaces.7: Move /proc/[pid]/mounts from proc.5 to namespaces.7
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man7/namespaces.7')
-rw-r--r--man7/namespaces.737
1 files changed, 27 insertions, 10 deletions
diff --git a/man7/namespaces.7 b/man7/namespaces.7
index 23a228421b..248de394ef 100644
--- a/man7/namespaces.7
+++ b/man7/namespaces.7
@@ -92,16 +92,6 @@ is equivalent in namespace terms to:
if (fork() == 0) /* if child */
unshare(CLONE_NEWXXX);
-.SS Mount namespaces (CLONE_NEWNS)
-
-Mount namespaces isolate the set of file system mount points,
-meaning that processes in different mount namespaces can
-have different views of the file system hierarchy.
-The set of mounts in a mount namespace is modified using
-.BR mount (2)
-and
-.BR umount (2).
-
.SS IPC namespaces (CLONE_NEWIPC)
IPC namespaces isolate certain IPC resources,
@@ -121,6 +111,33 @@ directory,
.I /sys/class/net
directory, port numbers, and so on.
+.SS Mount namespaces (CLONE_NEWNS)
+
+Mount namespaces isolate the set of file system mount points,
+meaning that processes in different mount namespaces can
+have different views of the file system hierarchy.
+The set of mounts in a mount namespace is modified using
+.BR mount (2)
+and
+.BR umount (2).
+
+The
+.IR /proc/[pid]/mounts
+file (present since Linux 2.4.19)
+lists all the file systems currently mounted in the
+process's mount namespace.
+The format of this file is documented in
+.BR fstab (5).
+Since kernel version 2.6.15, this file is pollable:
+after opening the file for reading, a change in this file
+(i.e., a file system mount or unmount) causes
+.BR select (2)
+to mark the file descriptor as readable, and
+.BR poll (2)
+and
+.BR epoll_wait (2)
+mark the file as having an error condition.
+
.SS PID namespaces (CLONE_NEWPID)
PID namespaces isolate the process ID number space,