相关疑难解决方法(0)

Linux - 了解mount命名空间并克隆CLONE_NEWNS标志

我正在阅读mountclone手册页.我想澄清一下CLONE_NEWNS如何影响子进程的文件系统视图.

(文件层次结构)

让我们将此树视为目录层次结构.让我们说5和6是父进程中的挂载点.我在另一个问题中澄清了挂载点.

所以我的理解是:5和6是挂载点意味着该mount命令以前用于在5和6处"挂载"文件系统(目录层次结构)(这意味着必须有5和6下的目录树).

mount手册页:

 A mount namespace is the set of filesystem mounts that are visible to a process. 
Run Code Online (Sandbox Code Playgroud)

clone手册页:

Every process lives in a mount namespace.  The namespace of a process is the data 
(the set of mounts) describing the file hierarchy as seen by that process.  After 
a fork(2) or clone() where the CLONE_NEWNS flag is not set, the child lives in the 
same mount …
Run Code Online (Sandbox Code Playgroud)

linux mount clone linux-namespaces

17
推荐指数
2
解决办法
1万
查看次数

标签 统计

clone ×1

linux ×1

linux-namespaces ×1

mount ×1