svn commit: r270294 - stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace

Konstantin Belousov kostikbel at gmail.com
Fri Aug 22 06:22:14 UTC 2014


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
> 
> Log:
>   MFC r269525:
>   Return 0 for the PPID of threads in process 0, as process 0 doesn't have a
>   parent process.
> 
> Modified:
>   stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
> Directory Properties:
>   stable/10/   (props changed)
> 
> Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
> ==============================================================================
> --- 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 == proc0.p_pid)
> +			return (curproc->p_pid);
> +		else
> +			return (curproc->p_pptr->p_pid);
>  #endif
>  
>  	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() ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20140822/6fd3d1be/attachment.sig>


More information about the svn-src-all mailing list