Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Aug 2014 19:45:54 +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-9@freebsd.org
Subject:   svn commit: r270295 - stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace
Message-ID:  <201408211945.s7LJjsxf049789@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Thu Aug 21 19:45:54 2014
New Revision: 270295
URL: http://svnweb.freebsd.org/changeset/base/270295

Log:
  MFC r269525:
  Return 0 for the PPID of threads in process 0, as process 0 doesn't have a
  parent process.

Modified:
  stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
Directory Properties:
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
==============================================================================
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c	Thu Aug 21 19:45:52 2014	(r270294)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c	Thu Aug 21 19:45:54 2014	(r270295)
@@ -3107,7 +3107,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.s7LJjsxf049789>