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
This commit is contained in:
parent
1217b24e51
commit
312827253b
@ -143,8 +143,8 @@ procfs_control(struct thread *td, struct proc *p, int op)
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user