mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +00:00
Kernel: wait() should not block if WNOHANG is specified
This commit is contained in:
committed by
Andreas Kling
parent
1c4f38749e
commit
9d54f21859
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user