mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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:
parent
bddcdc5193
commit
cf93aa166c
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue