1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 17:25:06 +00:00
serenity/Userland/Services/FileSystemAccessServer/main.cpp
2021-11-23 11:33:36 +01:00

24 lines
776 B
C++

/*
* Copyright (c) 2021, timmot <tiwwot@protonmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <FileSystemAccessServer/ClientConnection.h>
#include <LibCore/LocalServer.h>
#include <LibGUI/Application.h>
#include <LibIPC/ClientConnection.h>
#include <LibMain/Main.h>
#include <LibSystem/Wrappers.h>
ErrorOr<int> serenity_main(Main::Arguments)
{
TRY(System::pledge("stdio recvfd sendfd rpath cpath wpath unix thread", nullptr));
auto app = GUI::Application::construct(0, nullptr);
app->set_quit_when_last_window_deleted(false);
auto socket = Core::LocalSocket::take_over_accepted_socket_from_system_server();
IPC::new_client_connection<FileSystemAccessServer::ClientConnection>(socket.release_nonnull(), 1);
return app->exec();
}