PERFORCE change 134064 for review

John Birrell jb at FreeBSD.org
Thu Jan 24 21:52:05 PST 2008


http://perforce.freebsd.org/chv.cgi?CH=134064

Change 134064 by jb at jb_freebsd1 on 2008/01/25 05:51:49

	Allow a DTrace program to send a signal to a process and stop it
	too.

Affected files ...

.. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/dtrace/dtrace.c#26 edit

Differences ...

==== //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/dtrace/dtrace.c#26 (text) ====

@@ -5393,6 +5393,7 @@
 		return;
 	}
 
+#if defined(sun)
 	/*
 	 * raise() has a queue depth of 1 -- we ignore all subsequent
 	 * invocations of the raise() action.
@@ -5400,10 +5401,13 @@
 	if (curthread->t_dtrace_sig == 0)
 		curthread->t_dtrace_sig = (uint8_t)sig;
 
-printf("%s(%d): DOODAD\n",__func__,__LINE__);
-#ifdef DOODAD
 	curthread->t_sig_check = 1;
 	aston(curthread);
+#else
+	struct proc *p = curproc;
+	PROC_LOCK(p);
+	psignal(p, sig);
+	PROC_UNLOCK(p);
 #endif
 }
 
@@ -5413,14 +5417,18 @@
 	if (dtrace_destructive_disallow)
 		return;
 
+#if defined(sun)
 	if (!curthread->t_dtrace_stop) {
 		curthread->t_dtrace_stop = 1;
-printf("%s(%d): DOODAD\n",__func__,__LINE__);
-#ifdef DOODAD
 		curthread->t_sig_check = 1;
 		aston(curthread);
+	}
+#else
+	struct proc *p = curproc;
+	PROC_LOCK(p);
+	psignal(p, SIGSTOP);
+	PROC_UNLOCK(p);
 #endif
-	}
 }
 
 static void


More information about the p4-projects mailing list