From owner-svn-src-head@FreeBSD.ORG Thu Aug 7 18:45:38 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0C6D3F2 for ; Thu, 7 Aug 2014 18:45:38 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C4C325F6 for ; Thu, 7 Aug 2014 18:45:38 +0000 (UTC) Received: from bdrewery (uid 1298) (envelope-from bdrewery@freebsd.org) id ee4 by freefall.freebsd.org (DragonFly Mail Agent v0.9+); Thu, 07 Aug 2014 18:45:38 +0000 Received: (qmail 71650 invoked from network); 7 Aug 2014 13:45:34 -0500 Received: from unknown (HELO ?10.10.0.24?) (freebsd@shatow.net@10.10.0.24) by sweb.xzibition.com with ESMTPA; 7 Aug 2014 13:45:34 -0500 Message-ID: <53E3C93B.2080106@FreeBSD.org> Date: Thu, 07 Aug 2014 13:45:15 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r269656 - in head: bin/ps sys/kern sys/sys References: <53e31309.5581.568424c9@svn.freebsd.org> In-Reply-To: <53e31309.5581.568424c9@svn.freebsd.org> OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="i4ohngj1rj2iTrm50SgI3m9N7OHHuhRXt" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Aug 2014 18:45:38 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --i4ohngj1rj2iTrm50SgI3m9N7OHHuhRXt Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 8/7/2014 12:47 AM, Konstantin Belousov wrote: > Author: kib > Date: Thu Aug 7 05:47:53 2014 > New Revision: 269656 > URL: http://svnweb.freebsd.org/changeset/base/269656 >=20 > Log: > Correct the problems with the ptrace(2) making the debuggee an orphan= =2E > One problem is inferior(9) looping due to the process tree becoming a= > graph instead of tree if the parent is traced by child. Another issue= > is due to the use of p_oppid to restore the original parent/child > relationship, because real parent could already exited and its pid > reused (noted by mjg). > =20 > Add the function proc_realparent(9), which calculates the parent for > given process. It uses the flag P_TREE_FIRST_ORPHAN to detect the hea= d > element of the p_orphan list and than stepping back to its container > to find the parent process. If the parent has already exited, the > init(8) is returned. > =20 > Move the P_ORPHAN and the new helper flag from the p_flag* to new > p_treeflag field of struct proc, which is protected by proctree lock > instead of proc lock, since the orphans relationship is managed under= > the proctree_lock already. > =20 > The remaining uses of p_oppid in ptrace(PT_DETACH) and process > reapping are replaced by proc_realparent(9). > =20 > Phabric: D417 > Reviewed by: jhb > Tested by: pho > Sponsored by: The FreeBSD Foundation > MFC after: 2 weeks Thanks! --=20 Regards, Bryan Drewery --i4ohngj1rj2iTrm50SgI3m9N7OHHuhRXt Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) iQEcBAEBAgAGBQJT48lDAAoJEDXXcbtuRpfPgUYIALComLW73DQKNpkmTfOMv4nk Lo5xUFb0QooMiKaFEfQghMZzjM44uuWH59BIVivdyW79khRhByAhKdJIP6XLaZ4N Blp9FhDpjJIG5gjr/U0tMB1m+D6vIRjZXfyl72DE9Y9PAY9mk0kHQIG4P/0VuVC8 oN1qiIU12GSMCh4d4OW4KWPJjLbwJgZokyY0FeKfW20koxVnxrBpzreOHCzUz72A RO/2QnxC1/x8p/kImEGQpS3uNsgkjqTLzi8OeBp8QB8tyGo5SL2o/Ev/XlE3NOZR lwWIMi+oPJ2aX7y4k4dE7UYYFxqfrlN5wKqW63Yyfv8/HKqpc/4MGI5K6dZgWoE= =TR77 -----END PGP SIGNATURE----- --i4ohngj1rj2iTrm50SgI3m9N7OHHuhRXt--