LibCore: Make LocalSocket takeover mechanism return ErrorOr<T>

This commit is contained in:
Andreas Kling 2021-11-23 11:14:40 +01:00
parent c37a02341b
commit c1a3968c66
Notes: sideshowbarker 2024-07-18 00:49:18 +09:00
9 changed files with 26 additions and 33 deletions

View file

@ -16,8 +16,8 @@ ErrorOr<int> serenity_main(Main::Arguments)
Core::EventLoop event_loop;
TRY(Core::System::pledge("stdio unix rpath recvfd", nullptr));
auto socket = Core::LocalSocket::take_over_accepted_socket_from_system_server();
IPC::new_client_connection<LanguageServers::Shell::ClientConnection>(socket.release_nonnull(), 1);
auto socket = TRY(Core::LocalSocket::take_over_accepted_socket_from_system_server());
IPC::new_client_connection<LanguageServers::Shell::ClientConnection>(move(socket), 1);
TRY(Core::System::pledge("stdio rpath recvfd", nullptr));
TRY(Core::System::unveil("/etc/passwd", "r"));