mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:27:44 +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:
parent
ca16d9d98e
commit
0c38a4c30f
4 changed files with 25 additions and 6 deletions
|
@ -5,6 +5,8 @@
|
|||
#include <AK/AKString.h>
|
||||
#include <AK/InlineLinkedList.h>
|
||||
#include <AK/Lock.h>
|
||||
#include <AK/Badge.h>
|
||||
#include <Kernel/Process.h>
|
||||
#include "WSMessageReceiver.h"
|
||||
|
||||
class Process;
|
||||
|
@ -45,6 +47,8 @@ public:
|
|||
void set_global_cursor_tracking_enabled(bool);
|
||||
bool global_cursor_tracking() const { return m_global_cursor_tracking_enabled; }
|
||||
|
||||
void notify_process_died(Badge<Process>);
|
||||
|
||||
// For InlineLinkedList.
|
||||
// FIXME: Maybe make a ListHashSet and then WSWindowManager can just use that.
|
||||
WSWindow* m_next { nullptr };
|
||||
|
@ -58,7 +62,7 @@ private:
|
|||
bool m_global_cursor_tracking_enabled { false };
|
||||
|
||||
RetainPtr<GraphicsBitmap> m_backing;
|
||||
Process& m_process;
|
||||
Process* m_process { nullptr };
|
||||
int m_window_id { -1 };
|
||||
pid_t m_pid { -1 };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue