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:
parent
eb72ba2466
commit
4402207b98
Notes:
sideshowbarker
2024-07-19 06:31:37 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/4402207b983
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue