kernel: Signal the reap thread when a kernel thread exits via exit_and_signal_parent()
All checks were successful
Build and test / build (push) Successful in 1m54s

This shouldn't happen, but just in case.
This commit is contained in:
apio 2024-05-02 10:58:34 +02:00
parent 450ef2ce27
commit 907049c405
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -109,7 +109,10 @@ Result<SharedPtr<VFS::Inode>> Thread::resolve_atfile(int dirfd, const String& pa
#else #else
if (this->id == 1) CPU::magic_exit(_status); if (this->id == 1) CPU::magic_exit(_status);
#endif #endif
if (is_kernel) state = ThreadState::Dying; if (is_kernel) {
state = ThreadState::Dying;
Scheduler::signal_reap_thread();
}
else else
{ {
Scheduler::for_each_child(this, [](Thread* child) { Scheduler::for_each_child(this, [](Thread* child) {