Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Aug 2019 09:42:16 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r351016 - stable/11/lib/libc/sys
Message-ID:  <201908140942.x7E9gGnX075035@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Wed Aug 14 09:42:16 2019
New Revision: 351016
URL: https://svnweb.freebsd.org/changeset/base/351016

Log:
  MFC r350861:
  wait(2): clarify reparenting of children of the exiting process.

Modified:
  stable/11/lib/libc/sys/wait.2
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/lib/libc/sys/wait.2
==============================================================================
--- stable/11/lib/libc/sys/wait.2	Wed Aug 14 09:41:30 2019	(r351015)
+++ stable/11/lib/libc/sys/wait.2	Wed Aug 14 09:42:16 2019	(r351016)
@@ -28,7 +28,7 @@
 .\"     @(#)wait.2	8.2 (Berkeley) 4/19/94
 .\" $FreeBSD$
 .\"
-.Dd June 1, 2016
+.Dd August 11, 2019
 .Dt WAIT 2
 .Os
 .Sh NAME
@@ -511,8 +511,12 @@ A status of 0 indicates normal termination.
 .Pp
 If a parent process terminates without
 waiting for all of its child processes to terminate,
-the remaining child processes are assigned the parent
-process 1 ID (the init process ID).
+the remaining child processes are re-assigned to the reaper
+of the exiting process as the parent, see
+.Xr procctl 2
+.Dv PROC_REAP_ACQUIRE .
+If no specific reaper was assigned, the process with ID 1, the init process,
+becomes the parent of the orphaned children by default.
 .Pp
 If a signal is caught while any of the
 .Fn wait
@@ -650,6 +654,7 @@ do not specify a valid set of processes.
 .El
 .Sh SEE ALSO
 .Xr _exit 2 ,
+.Xr procctl 2 ,
 .Xr ptrace 2 ,
 .Xr sigaction 2 ,
 .Xr exit 3 ,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908140942.x7E9gGnX075035>