Date: Fri, 22 May 2015 11:03:52 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283281 - head/sys/fs/procfs Message-ID: <201505221103.t4MB3qR4054779@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Fri May 22 11:03:51 2015 New Revision: 283281 URL: https://svnweb.freebsd.org/changeset/base/283281 Log: Always set p_oppid when attaching to an existing process via procfs tracing. This matches the behavior of ptrace(PT_ATTACH). Also, the procfs detach request assumes p_oppid is always set. Reviewed by: kib MFC after: 2 weeks Modified: head/sys/fs/procfs/procfs_ctl.c Modified: head/sys/fs/procfs/procfs_ctl.c ============================================================================== --- head/sys/fs/procfs/procfs_ctl.c Fri May 22 09:03:55 2015 (r283280) +++ head/sys/fs/procfs/procfs_ctl.c Fri May 22 11:03:51 2015 (r283281) @@ -143,8 +143,8 @@ procfs_control(struct thread *td, struct p->p_flag |= P_TRACED; faultin(p); p->p_xstat = 0; /* XXX ? */ + p->p_oppid = p->p_pptr->p_pid; if (p->p_pptr != td->td_proc) { - p->p_oppid = p->p_pptr->p_pid; proc_reparent(p, td->td_proc); } kern_psignal(p, SIGSTOP);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505221103.t4MB3qR4054779>