diff --git a/gui/launch.cpp b/gui/launch.cpp index 981b3222..6dca6415 100644 --- a/gui/launch.cpp +++ b/gui/launch.cpp @@ -48,7 +48,7 @@ void handle_ipc_message(os::IPC::ClientConnection& client, u8 id, void*) void sigchld_handler(int) { - os::Process::wait(os::Process::ANY_CHILD, nullptr); + os::Process::wait(os::Process::ANY_CHILD, nullptr, WNOHANG); } Result luna_main(int argc, char** argv) diff --git a/kernel/src/thread/Thread.cpp b/kernel/src/thread/Thread.cpp index 1d56b822..6909739c 100644 --- a/kernel/src/thread/Thread.cpp +++ b/kernel/src/thread/Thread.cpp @@ -147,11 +147,8 @@ Result> Thread::resolve_atfile(int dirfd, const String& pa parent->wake_up(); } } - else - { - while (parent->pending_signals.get(SIGCHLD - 1)) kernel_yield(); - parent->send_signal(SIGCHLD); - } + while (parent->pending_signals.get(SIGCHLD - 1)) kernel_yield(); + parent->send_signal(SIGCHLD); } state = ThreadState::Exited;