Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Jul 2004 03:56:01 GMT
From:      David Xu <davidxu@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 57040 for review
Message-ID:  <200407110356.i6B3u1Ck055838@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=57040

Change 57040 by davidxu@davidxu_alona on 2004/07/11 03:55:06

	Only check TDF_DBSUSPEND when P_TRACED is turned on.

Affected files ...

.. //depot/projects/davidxu_ksedbg/src/sys/kern/kern_sig.c#7 edit

Differences ...

==== //depot/projects/davidxu_ksedbg/src/sys/kern/kern_sig.c#7 (text+ko) ====

@@ -2014,7 +2014,7 @@
 	td->td_flags |= TDF_XSIG;
 	mtx_unlock_spin(&sched_lock);
 	td->td_xsig = sig;
-	while (td->td_flags & TDF_XSIG) {
+	while ((p->p_flag & P_TRACED) && (td->td_flags & TDF_XSIG)) {
 		if (p->p_flag & P_SINGLE_EXIT) {
 			mtx_lock_spin(&sched_lock);
 			td->td_flags &= ~TDF_XSIG;
@@ -2047,6 +2047,8 @@
 		mtx_unlock_spin(&sched_lock);
 		PICKUP_GIANT();
 		PROC_LOCK(p);
+		if (!(p->p_flag & P_TRACED))
+			break;
 		if (td->td_flags & TDF_DBSUSPEND) {
 			if (p->p_flag & P_SINGLE_EXIT)
 				break;



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