]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
prctl.2: Improve description of PR_SET_CHILD_SUBREAPER
authorMichael Kerrisk <mtk.manpages@gmail.com>
Thu, 16 Mar 2017 07:26:24 +0000 (08:26 +0100)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Fri, 17 Mar 2017 05:54:32 +0000 (06:54 +0100)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man2/prctl.2

index f48643b954fe8d80e85a888d9e298f7e83e66858..633a0eb1761215ccb9cdb112bde5baa197f0a3fd 100644 (file)
@@ -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