svn commit: r283889 - head/sys/kern
Xin LI
delphij at FreeBSD.org
Mon Jun 1 18:15:46 UTC 2015
Author: delphij
Date: Mon Jun 1 18:15:45 2015
New Revision: 283889
URL: https://svnweb.freebsd.org/changeset/base/283889
Log:
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
Modified:
head/sys/kern/sys_process.c
Modified: head/sys/kern/sys_process.c
==============================================================================
--- head/sys/kern/sys_process.c Mon Jun 1 18:15:44 2015 (r283888)
+++ head/sys/kern/sys_process.c Mon Jun 1 18:15:45 2015 (r283889)
@@ -963,6 +963,7 @@ kern_ptrace(struct thread *td, int req,
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); */
More information about the svn-src-all
mailing list