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
commit 0c38a4c30f
Notes: sideshowbarker 2024-07-19 15:51:56 +09:00
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
}