1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:47:44 +00:00

Base: Launch InspectorServer at session start-up

This commit is contained in:
Lucas CHOLLET 2022-07-24 15:32:41 +02:00 committed by Linus Groh
parent b01822bdd4
commit c248569d6b
5 changed files with 9 additions and 10 deletions

View file

@ -19,10 +19,10 @@ ErrorOr<int> serenity_main(Main::Arguments)
TRY(Core::System::pledge("stdio unix accept"));
auto server = TRY(IPC::MultiServer<InspectorServer::ConnectionFromClient>::try_create("/tmp/portal/inspector"));
auto server = TRY(IPC::MultiServer<InspectorServer::ConnectionFromClient>::try_create("/tmp/user/%uid/portal/inspector"));
auto inspectables_server = TRY(Core::LocalServer::try_create());
TRY(inspectables_server->take_over_from_system_server("/tmp/portal/inspectables"));
TRY(inspectables_server->take_over_from_system_server("/tmp/user/%uid/portal/inspectables"));
inspectables_server->on_accept = [&](auto client_socket) {
auto pid = client_socket->peer_pid().release_value_but_fixme_should_propagate_errors();