From owner-svn-src-all@freebsd.org Sun Aug 11 15:47:48 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D84CEBBFC4; Sun, 11 Aug 2019 15:47:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4663K05JZ7z44bd; Sun, 11 Aug 2019 15:47:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 984A618769; Sun, 11 Aug 2019 15:47:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7BFlmId085764; Sun, 11 Aug 2019 15:47:48 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7BFlm8X085763; Sun, 11 Aug 2019 15:47:48 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201908111547.x7BFlm8X085763@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 11 Aug 2019 15:47:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350861 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 350861 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Aug 2019 15:47:48 -0000 Author: kib Date: Sun Aug 11 15:47:48 2019 New Revision: 350861 URL: https://svnweb.freebsd.org/changeset/base/350861 Log: wait(2): clarify reparenting of children of the exiting process. Point to the existence of reapers and mention that init is the default reaper. Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/lib/libc/sys/wait.2 Modified: head/lib/libc/sys/wait.2 ============================================================================== --- head/lib/libc/sys/wait.2 Sun Aug 11 15:44:36 2019 (r350860) +++ head/lib/libc/sys/wait.2 Sun Aug 11 15:47:48 2019 (r350861) @@ -28,7 +28,7 @@ .\" @(#)wait.2 8.2 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd October 24, 2018 +.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 @@ -648,6 +652,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 ,