Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Aug 2014 19:45:52 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r270294 - stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace
Message-ID:  <201408211945.s7LJjqST049739@svn.freebsd.org>

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



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