prctl.2: Explain rationale for use of subreaper processes

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2017-03-17 07:55:58 +01:00
parent f0fb21d143
commit 94e460d409
1 changed files with 11 additions and 0 deletions

View 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,