From 534755eed9b8157ee1ad3227d693d0384f5ca3aa Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Tue, 8 Oct 2019 22:51:59 +0200 Subject: [PATCH] mount_namespaces.7: Explain how a namespace's mount point list is initialized Provide a more detailed explanation of the initialization of the mount point list in a new mount namespace. Signed-off-by: Michael Kerrisk --- man7/mount_namespaces.7 | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/man7/mount_namespaces.7 b/man7/mount_namespaces.7 index 836107a88..0edf33b17 100644 --- a/man7/mount_namespaces.7 +++ b/man7/mount_namespaces.7 @@ -48,15 +48,26 @@ resides. (All of the processes that reside in the same mount namespace will see the same view in these files.) .PP -When a process creates a new mount namespace using +A new mount namespace is created using either .BR clone (2) or .BR unshare (2) with the .BR CLONE_NEWNS -flag, the mount point list for the new namespace is a -.I copy -of the caller's mount point list. +flag. +When a new mount namespace is created, +its mount point list is initialized as follows: +.IP * 3 +If the namespace is created using +.BR clone (2), +the mount point list of the child's namespace is a copy +of the mount point list in the parent's namespace. +.IP * +If the namespace is created using +.BR unshare (2), +the mount point list of the new namespace is a copy of +the mount point list in the caller's previous mount namespace. +.PP Subsequent modifications to the mount point list .RB ( mount (2) and