1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:18:11 +00:00

Kernel: Fix broken destruction order for Process/Thread.

This commit is contained in:
Andreas Kling 2019-03-24 01:20:35 +01:00
parent b6cd66c3b5
commit 5713c3a0cb
4 changed files with 7 additions and 4 deletions

View file

@ -72,7 +72,7 @@ bool Scheduler::pick_next()
if (thread.state() == Thread::BlockedWait) {
process.for_each_child([&] (Process& child) {
if (child.state() != Thread::Dead)
if (!child.is_dead())
return true;
if (thread.waitee_pid() == -1 || thread.waitee_pid() == child.pid()) {
thread.m_waitee_pid = child.pid();