Clear p_stops when doing PT_DETACH.
Without this, if a process was being traced by truss(1), which uses different p_stops bits than gdb(1), the latter would misbehave because of the unexpected bits. Reported by: jceel Submitted by: sef Sponsored by: iXsystems, Inc. MFC after: 2 weeks
This commit is contained in:
parent
2898b805c5
commit
0226e94a1c
@ -963,6 +963,7 @@ kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, int data)
|
||||
CTR1(KTR_PTRACE, "PT_DETACH: pid %d", p->p_pid);
|
||||
p->p_oppid = 0;
|
||||
p->p_flag &= ~(P_TRACED | P_WAITED | P_FOLLOWFORK);
|
||||
p->p_stops = 0;
|
||||
|
||||
/* should we send SIGCHLD? */
|
||||
/* childproc_continued(p); */
|
||||
|
Loading…
Reference in New Issue
Block a user