diff --git a/kernel/src/thread/Thread.cpp b/kernel/src/thread/Thread.cpp index b5062693..e35cca9e 100644 --- a/kernel/src/thread/Thread.cpp +++ b/kernel/src/thread/Thread.cpp @@ -109,7 +109,10 @@ Result> Thread::resolve_atfile(int dirfd, const String& pa #else if (this->id == 1) CPU::magic_exit(_status); #endif - if (is_kernel) state = ThreadState::Dying; + if (is_kernel) { + state = ThreadState::Dying; + Scheduler::signal_reap_thread(); + } else { Scheduler::for_each_child(this, [](Thread* child) {