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

WindowServer: Sever the WSWindow/Process link when the process dies.

This fixes a deadlock where the WindowServer would get stuck trying to
acquire a dead process's event stream lock.
This commit is contained in:
Andreas Kling 2019-02-05 08:32:32 +01:00
parent ca16d9d98e
commit 0c38a4c30f
4 changed files with 25 additions and 6 deletions

View file

@ -236,7 +236,10 @@ bool Scheduler::context_switch(Process& process)
current->set_state(Process::Runnable);
#ifdef LOG_EVERY_CONTEXT_SWITCH
dbgprintf("Scheduler: %s(%u) -> %s(%u)\n", current->name().characters(), current->pid(), process.name().characters(), process.pid());
dbgprintf("Scheduler: %s(%u) -> %s(%u) %w:%x\n",
current->name().characters(), current->pid(),
process.name().characters(), process.pid(),
process.tss().cs, process.tss().eip);
#endif
}