]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
prctl.2: Explain rationale for use of subreaper processes
authorMichael Kerrisk <mtk.manpages@gmail.com>
Fri, 17 Mar 2017 06:55:58 +0000 (07:55 +0100)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Fri, 17 Mar 2017 11:33:58 +0000 (12:33 +0100)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man2/prctl.2

index 633a0eb1761215ccb9cdb112bde5baa197f0a3fd..ed374e58620eb63856e7ab6f456d1715e0817c94 100644 (file)
@@ -184,6 +184,17 @@ and
 .BR clone (2).
 The setting is preserved across
 .BR execve (2).
+
+Establishing a subreaper process is useful in session management frameworks
+where a hierarchical group of processes is managed by a subreaper process
+that needs to be informed when one of the processes\(emfor example,
+a double-forked daemon\(emterminates
+(perhaps so that it can restart that process).
+Some
+.BR init (1)
+frameworks (e.g.,
+.BR systemd (1))
+employ a subreaper process for similar reasons.
 .TP
 .BR PR_GET_CHILD_SUBREAPER " (since Linux 3.4)"
 Return the "child subreaper" setting of the caller,