Kernel: WaitBlocker should always unblock immediately on WNOHANG

This fixes a problem where we'd block if a process with no children
would call sys$waitid() with WNOHANG. This unbreaks bash :^)
This commit is contained in:
Andreas Kling 2020-05-18 13:05:25 +02:00
parent eb72ba2466
commit 4402207b98
Notes: sideshowbarker 2024-07-19 06:31:37 +09:00

View file

@ -251,7 +251,7 @@ Thread::WaitBlocker::WaitBlocker(int wait_options, pid_t& waitee_pid)
bool Thread::WaitBlocker::should_unblock(Thread& thread, time_t, long)
{
bool should_unblock = false;
bool should_unblock = m_wait_options & WNOHANG;
if (m_waitee_pid != -1) {
auto* peer = Process::from_pid(m_waitee_pid);
if (!peer)