mirror of https://github.com/mkerrisk/man-pages
prctl.2: Improve description of PR_SET_CHILD_SUBREAPER
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
d59a75720f
commit
fbc639312f
17
man2/prctl.2
17
man2/prctl.2
|
@ -161,16 +161,17 @@ if
|
|||
.I arg2
|
||||
is zero, unset the attribute.
|
||||
|
||||
When a process is marked as a child subreaper,
|
||||
all of the children that it creates, and their descendants,
|
||||
will be marked as having a subreaper.
|
||||
In effect, a subreaper fulfills the role of
|
||||
A subreaper fulfills the role of
|
||||
.BR init (1)
|
||||
for its descendant processes.
|
||||
Upon termination of a process
|
||||
that is orphaned (i.e., its immediate parent has already terminated)
|
||||
and marked as having a subreaper,
|
||||
the nearest still living ancestor subreaper
|
||||
When a process becomes orphaned
|
||||
(i.e., its immediate parent terminates)
|
||||
then that process will be reparented to
|
||||
the nearest still living ancestor subreaper.
|
||||
Subsequently, calls to
|
||||
.BR getppid ()
|
||||
in the orphaned process will now return the PID of the subreaper process,
|
||||
and when the orphan terminates, it is the subreaper process that
|
||||
will receive a
|
||||
.BR SIGCHLD
|
||||
signal and will be able to
|
||||
|
|
Loading…
Reference in New Issue