proc: read the pid prior to unlocking in report_alive_proc1
In principle another thread could have reaped the process by that time.
This commit is contained in:
parent
5d0aebf4fa
commit
49afea1059
@ -1269,8 +1269,8 @@ report_alive_proc(struct thread *td, struct proc *p, siginfo_t *siginfo,
|
||||
}
|
||||
if (status != NULL)
|
||||
*status = cont ? SIGCONT : W_STOPCODE(p->p_xsig);
|
||||
PROC_UNLOCK(p);
|
||||
td->td_retval[0] = p->p_pid;
|
||||
PROC_UNLOCK(p);
|
||||
}
|
||||
|
||||
int
|
||||
|
Loading…
Reference in New Issue
Block a user