Serenity Operating System
at master 22 lines 676 B view raw
1/* 2 * Copyright (c) 2021, timmot <tiwwot@protonmail.com> 3 * 4 * SPDX-License-Identifier: BSD-2-Clause 5 */ 6 7#include <FileSystemAccessServer/ConnectionFromClient.h> 8#include <LibCore/System.h> 9#include <LibGUI/Application.h> 10#include <LibIPC/SingleServer.h> 11#include <LibMain/Main.h> 12 13ErrorOr<int> serenity_main(Main::Arguments) 14{ 15 TRY(Core::System::pledge("stdio recvfd sendfd rpath cpath wpath unix thread")); 16 17 auto app = TRY(GUI::Application::try_create(0, nullptr)); 18 app->set_quit_when_last_window_deleted(false); 19 20 auto client = TRY(IPC::take_over_accepted_client_from_system_server<FileSystemAccessServer::ConnectionFromClient>()); 21 return app->exec(); 22}