Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 07 Aug 2014 13:45:15 -0500
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        Konstantin Belousov <kib@FreeBSD.org>, 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
Message-ID:  <53E3C93B.2080106@FreeBSD.org>
In-Reply-To: <53e31309.5581.568424c9@svn.freebsd.org>
References:  <53e31309.5581.568424c9@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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--



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