From owner-svn-src-all@freebsd.org Wed Aug 14 09:39:39 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 C6B61CCDA8; Wed, 14 Aug 2019 09:39:39 +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 467l0q4fk3z43Xw; Wed, 14 Aug 2019 09:39:39 +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 80DE025E80; Wed, 14 Aug 2019 09:39:39 +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 x7E9dd8U069947; Wed, 14 Aug 2019 09:39:39 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7E9ddvT069946; Wed, 14 Aug 2019 09:39:39 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201908140939.x7E9ddvT069946@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 14 Aug 2019 09:39:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r351012 - stable/12/lib/libc/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/lib/libc/sys X-SVN-Commit-Revision: 351012 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: Wed, 14 Aug 2019 09:39:39 -0000 Author: kib Date: Wed Aug 14 09:39:39 2019 New Revision: 351012 URL: https://svnweb.freebsd.org/changeset/base/351012 Log: MFC r350861: wait(2): clarify reparenting of children of the exiting process. Modified: stable/12/lib/libc/sys/wait.2 Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/sys/wait.2 ============================================================================== --- stable/12/lib/libc/sys/wait.2 Wed Aug 14 09:38:55 2019 (r351011) +++ stable/12/lib/libc/sys/wait.2 Wed Aug 14 09:39:39 2019 (r351012) @@ -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 ,