1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 11:17:44 +00:00

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)
This commit is contained in:
Andreas Kling 2021-05-13 22:42:11 +02:00
parent 3d3a5b431f
commit dc25a4e249
6 changed files with 77 additions and 121 deletions

View file

@ -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);