mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:48:10 +00:00
Kernel: wait() should not block if WNOHANG is specified
This commit is contained in:
parent
1c4f38749e
commit
9d54f21859
1 changed files with 3 additions and 2 deletions
|
@ -2466,8 +2466,9 @@ KResultOr<siginfo_t> Process::do_waitid(idtype_t idtype, int id, int options)
|
|||
return KResult(-EINVAL);
|
||||
}
|
||||
|
||||
if (Thread::current->block<Thread::WaitBlocker>(options, waitee_pid) != Thread::BlockResult::WokeNormally)
|
||||
return KResult(-EINTR);
|
||||
if (!(options & WNOHANG))
|
||||
if (Thread::current->block<Thread::WaitBlocker>(options, waitee_pid) != Thread::BlockResult::WokeNormally)
|
||||
return KResult(-EINTR);
|
||||
|
||||
InterruptDisabler disabler;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue