1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-07 12:07:35 +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

@ -264,6 +264,7 @@ void Process::destroy_all_windows()
{
for (auto& it : m_windows) {
auto message = make<WSMessage>(WSMessage::WM_DestroyWindow);
it.value->notify_process_died(Badge<Process>());
WSMessageLoop::the().post_message(it.value.leak_ptr(), move(message), true);
}
m_windows.clear();