对于 Linux PID 命名空间,是否有真正的 PID 1 进程(不是同一个可执行文件)来还在 PID 命名空间中充当 PID 1?
答案1
没看到man 7 pid_namespaces
:
The namespace init process The first process created in a new namespace (i.e., the process created using clone(2) with the CLONE_NEWPID flag, or the first child created by a process after a call to unshare(2) using the CLONE_NEWPID flag) has the PID 1, and is the "init" process for the namespace (see init(1)).
新 pid 命名空间中的进程pid = 1
始终来自新进程创建,您不能将现有进程设为init
新 pid 命名空间中的进程。