diff options
author | Andreas Kling <kling@serenityos.org> | 2021-05-13 22:42:11 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-13 23:28:40 +0200 |
commit | dc25a4e2492b8ad4f4ba7179861b4ae96c07e9ca (patch) | |
tree | 1a9beb42ef0bec5cb09dcd2c04991d800eb6f338 /Userland/Libraries/LibCore/EventLoop.h | |
parent | 3d3a5b431f1836b6905e5ac2408389916b3e1ce1 (diff) | |
download | serenity-dc25a4e2492b8ad4f4ba7179861b4ae96c07e9ca.zip |
LibCore+Inspector: Reverse the direction of Inspector connections
Core::EventLoop now makes an outbound connection to InspectorServer
instead of listening for incoming connections on a /tmp/rpc/PID socket.
This has many benefits, for example:
- We no longer keep an open listening socket in most applications
- We stop leaking socket files in /tmp/rpc
- We can tighten the pledges in many programs (patch coming)
Diffstat (limited to 'Userland/Libraries/LibCore/EventLoop.h')
-rw-r--r-- | Userland/Libraries/LibCore/EventLoop.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Userland/Libraries/LibCore/EventLoop.h b/Userland/Libraries/LibCore/EventLoop.h index a4c439d526..c47d963cf6 100644 --- a/Userland/Libraries/LibCore/EventLoop.h +++ b/Userland/Libraries/LibCore/EventLoop.h @@ -21,7 +21,12 @@ namespace Core { class EventLoop { public: - EventLoop(); + enum class MakeInspectable { + No, + Yes, + }; + + EventLoop(MakeInspectable = MakeInspectable::Yes); ~EventLoop(); int exec(); @@ -69,7 +74,6 @@ public: static void notify_forked(ForkEvent); private: - bool start_rpc_server(); void wait_for_event(WaitMode); Optional<struct timeval> get_next_timer_expiration(); static void dispatch_signal(int); |