Page MenuHomeFreeBSD

D44638.id136566.diff
No OneTemporary

D44638.id136566.diff

diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c
--- a/sys/kern/kern_proc.c
+++ b/sys/kern/kern_proc.c
@@ -3477,7 +3477,8 @@
LIST_REMOVE(cp, p_list);
LIST_INSERT_AFTER(p, cp, p_list);
PROC_LOCK(p);
- if ((p->p_flag & (P_KPROC | P_SYSTEM | P_TOTAL_STOP)) != 0) {
+ if ((p->p_flag & (P_KPROC | P_SYSTEM | P_TOTAL_STOP |
+ P_STOPPED_SIG)) != 0) {
PROC_UNLOCK(p);
continue;
}
@@ -3498,6 +3499,16 @@
PROC_UNLOCK(p);
continue;
}
+ if ((p->p_flag & P_TRACED) != 0) {
+ /*
+ * thread_single() below cannot stop traced p,
+ * so skip it. OTOH, we cannot require
+ * restart because debugger might be either
+ * already stopped or traced as well.
+ */
+ PROC_UNLOCK(p);
+ continue;
+ }
sx_xunlock(&allproc_lock);
_PHOLD(p);
r = thread_single(p, SINGLE_ALLPROC);

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 8, 11:06 AM (8 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14533860
Default Alt Text
D44638.id136566.diff (832 B)

Event Timeline