When reparenting a process in the PT_DETACH code, only set p_sigparent

to SIGCHLD if the new parent process is initproc.

MFC after:	2 weeks
This commit is contained in:
Don Lewis 2004-02-19 10:39:42 +00:00
parent bddcdc5193
commit cf93aa166c

View file

@ -561,7 +561,8 @@ kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, int data)
PROC_UNLOCK(pp);
PROC_LOCK(p);
proc_reparent(p, pp);
p->p_sigparent = SIGCHLD;
if (pp == initproc)
p->p_sigparent = SIGCHLD;
}
p->p_flag &= ~(P_TRACED | P_WAITED);
p->p_oppid = 0;