namespaces.7: List factors that may pin a namespace into existence

Various factors may pin a namespace into existence, even when it
has no member processes.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2018-08-03 07:30:17 +02:00
parent 2337d75ee0
commit 9a6d888cb6
1 changed files with 32 additions and 0 deletions

View File

@ -412,6 +412,38 @@ and
Use of UTS namespaces requires a kernel that is configured with the
.B CONFIG_UTS_NS
option.
.\"
.SS Namespace lifetime
Absent any other factors,
a namespace is automatically torn down when the last process in
the namespace terminates or leaves the namespace.
However, there are a number of other factors that may pin
a namespace into existence even though it has no member processes.
These factors include the following:
.IP * 3
An open file descriptor or a bind mount exists for the corresponding
.IR /proc/[pid]/ns/*
file.
.IP *
The namespace is hierarchical (i.e., a PID or user namespace),
and has a child namespace.
.IP *
It is a user namespace that owns one or more nonuser namespaces.
.IP *
It is a PID namespace,
and there is a process that refers to the namespace via a
.IR /proc/[pid]/ns/pid_for_children
symbolic link.
.IP *
It is an IPC namespace, and a corresponding mount of an
.I mqueue
filesystem (see
.BR mq_overview (7))
refers to this namespace.
.IP *
It is an PID namespace, and a corresponding mount of a
.BR proc (5)
filesystem refers to this namespace.
.SH EXAMPLE
See
.BR clone (2)