summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCore/EventLoop.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-05-13 22:42:11 +0200
committerAndreas Kling <kling@serenityos.org>2021-05-13 23:28:40 +0200
commitdc25a4e2492b8ad4f4ba7179861b4ae96c07e9ca (patch)
tree1a9beb42ef0bec5cb09dcd2c04991d800eb6f338 /Userland/Libraries/LibCore/EventLoop.h
parent3d3a5b431f1836b6905e5ac2408389916b3e1ce1 (diff)
downloadserenity-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.h8
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);