1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:28:11 +00:00

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

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)