diff --git a/Kernel/Scheduler.cpp b/Kernel/Scheduler.cpp index 1c3f3b19fc..76156bd283 100644 --- a/Kernel/Scheduler.cpp +++ b/Kernel/Scheduler.cpp @@ -273,11 +273,10 @@ bool Thread::WaitBlocker::should_unblock(Thread& thread, time_t, long) }); } - bool wait_finished = ((m_wait_options & WEXITED) && child_exited) - || ((m_wait_options & WSTOPPED) && child_stopped) - || (m_wait_options & WNOHANG); + bool fits_the_spec = ((m_wait_options & WEXITED) && child_exited) + || ((m_wait_options & WSTOPPED) && child_stopped); - if (!wait_finished) + if (!fits_the_spec) return IterationDecision::Continue; m_waitee_pid = child.pid();