mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:38:10 +00:00
Kernel: waitpid() should unblock and -ECHILD if SIG_IGN reaps child
This commit is contained in:
parent
c983e96664
commit
23eafdb8d6
2 changed files with 8 additions and 0 deletions
|
@ -1554,6 +1554,9 @@ pid_t Process::sys$waitpid(pid_t waitee, int* wstatus, int options)
|
|||
|
||||
// NOTE: If waitee was -1, m_waitee_pid will have been filled in by the scheduler.
|
||||
Process* waitee_process = Process::from_pid(waitee_pid);
|
||||
if (!waitee_process)
|
||||
return -ECHILD;
|
||||
|
||||
ASSERT(waitee_process);
|
||||
if (waitee_process->is_dead()) {
|
||||
exit_status = reap(*waitee_process);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue