lkml.org 
[lkml]   [2019]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] clone.2: Mention that CLONE_PARENT is off-limits for inits
Date
From: Christian Brauner <christian.brauner@ubuntu.com>

The CLONE_PARENT flag cannot but used by init processes. Let's mention
this in the manpages to prevent suprises.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
---
man2/clone.2 | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/man2/clone.2 b/man2/clone.2
index f0f29d6f1..aa98ab79b 100644
--- a/man2/clone.2
+++ b/man2/clone.2
@@ -646,6 +646,13 @@ if
.B CLONE_PARENT
is set, then the parent of the calling process, rather than the
calling process itself, will be signaled.
+.IP
+The kernel will not allow global init and init processes in pid
+namespaces to use the
+.B CLONE_PARENT
+flag. This is done to prevent the creation of multi-rooted process
+trees. It also avoids unreapable zombies in the initial pid
+namespace.
.TP
.BR CLONE_PARENT_SETTID " (since Linux 2.5.49)"
Store the child thread ID at the location pointed to by
--
2.24.0
\
 
 \ /
  Last update: 2019-11-20 11:46    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog