Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Aug 2014 09:22:07 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Mark Johnston <markj@FreeBSD.org>
Cc:        svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   Re: svn commit: r270294 - stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace
Message-ID:  <20140822062207.GK2737@kib.kiev.ua>
In-Reply-To: <201408211945.s7LJjqST049739@svn.freebsd.org>
References:  <201408211945.s7LJjqST049739@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--cNa0Phtf76TQ4tlb
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Aug 21, 2014 at 07:45:52PM +0000, Mark Johnston wrote:
> Author: markj
> Date: Thu Aug 21 19:45:52 2014
> New Revision: 270294
> URL: http://svnweb.freebsd.org/changeset/base/270294
>=20
> Log:
>   MFC r269525:
>   Return 0 for the PPID of threads in process 0, as process 0 doesn't hav=
e a
>   parent process.
>=20
> Modified:
>   stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
> Directory Properties:
>   stable/10/   (props changed)
>=20
> Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace=
=2Ec
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c	Thu=
 Aug 21 19:42:24 2014	(r270293)
> +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c	Thu=
 Aug 21 19:45:52 2014	(r270294)
> @@ -3415,7 +3415,10 @@ dtrace_dif_variable(dtrace_mstate_t *mst
>  		 */
>  		return ((uint64_t)curthread->t_procp->p_ppid);
>  #else
> -		return ((uint64_t)curproc->p_pptr->p_pid);
> +		if (curproc->p_pid =3D=3D proc0.p_pid)
> +			return (curproc->p_pid);
> +		else
> +			return (curproc->p_pptr->p_pid);
>  #endif
> =20
>  	case DIF_VAR_TID:
BTW, does the code look for the parent, or for the debugger of the current
process ? I mean, should the snippet above use p_pptr or real_parent() ?

--cNa0Phtf76TQ4tlb
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBAgAGBQJT9uGPAAoJEJDCuSvBvK1BY1MP/ix0AFaw0b54RIfCuPzC2s4x
tYD4HU/xa7kcs3/vBXooiPneZZTD5q/V/jtGPrcPMdZ0RscMl2RQK1KIpmnOk80f
I95vWpt3u51hfI7ySjmGlUSzbJspom6Ap2lWNFJXv2r/QlMjWAhcDGql8nmZkJLk
b96IRCXcdgOqJf6eLir/csyTqU9CVWpLPR6CshJbCOiSnUkfpByWQSeKSOLzDjNZ
mB83KEjSsZr12sf0jy78jlQy6LJ9KvuwDUgCvGLYMHDJXRRWZihzWcV5qWKGKKn9
HDi9ZpahJGw/RvP6lNhgUNNdEtHIL5rqGM1udkKyW6TUCXtBv4EVaraqj2NHcbIM
z9aAeUm+a7uBjF+By4uJOocTGYDbrDClD8DhsF0i1FwC8/whNH2fwSPFSfAyPOF0
V8z8V7c3W6XcxPwhIznB4CYtsRmxIt5Y4WWlAL0Z++gDb4+V2UXiIhStSJCuFzr+
X6kLHAxAZQM4OYPGplGwErV22XBAD7G4VW2SIgv/WU7WhjSHuxyDkY+z1ZzAgxWE
R0umPnacB3gglybjkkp7I/U5A3jcY+pVxyflD4r5eSyGlUD9uudTsOhRM8eHy/4I
b6O+h7xkvr3wwpJE5p4zB++2va6mWT0kK0QIyHk73/OgU5fjIkmcJxIWrPdwLEye
vk+eAEa/DG9hxJh9EWAS
=YyOi
-----END PGP SIGNATURE-----

--cNa0Phtf76TQ4tlb--



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