From 1a7e08e36790c2f5dfbb0e94c9b6a8b194bdde72 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Wed, 21 Feb 2018 17:31:48 +0100 Subject: [PATCH] namespaces.7: Note an idiosyncracy of /proc/[pid]/ns/pid_for_children /proc/[pid]/ns/pid_for_children has a value only after first child is created in PID namespace. Verified by experiment. Signed-off-by: Michael Kerrisk --- man7/namespaces.7 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/man7/namespaces.7 b/man7/namespaces.7 index c50c45e69..725ebaff6 100644 --- a/man7/namespaces.7 +++ b/man7/namespaces.7 @@ -203,6 +203,11 @@ and .BR pid_namespaces (7)), so the file may differ from .IR /proc/[pid]/ns/pid . +The symbolic link gains a value only after the first child process +is created in the namespace. +(Beforehand, +.BR readlink (2) +of the symbolic link will return an empty buffer.) .TP .IR /proc/[pid]/ns/user " (since Linux 3.8)" .\" commit cde1975bc242f3e1072bde623ef378e547b73f91