mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:18:11 +00:00
LibCore: Make LocalSocket takeover mechanism return ErrorOr<T>
This commit is contained in:
parent
c37a02341b
commit
c1a3968c66
9 changed files with 26 additions and 33 deletions
|
@ -17,8 +17,8 @@ ErrorOr<int> serenity_main(Main::Arguments)
|
|||
TRY(Core::System::pledge("stdio recvfd sendfd unix", nullptr));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
auto socket = Core::LocalSocket::take_over_accepted_socket_from_system_server();
|
||||
IPC::new_client_connection<ImageDecoder::ClientConnection>(socket.release_nonnull(), 1);
|
||||
auto socket = TRY(Core::LocalSocket::take_over_accepted_socket_from_system_server());
|
||||
IPC::new_client_connection<ImageDecoder::ClientConnection>(move(socket), 1);
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd", nullptr));
|
||||
return event_loop.exec();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue