Serenity Operating System
at master 25 lines 745 B view raw
1/* 2 * Copyright (c) 2020-2021, Andreas Kling <kling@serenityos.org> 3 * 4 * SPDX-License-Identifier: BSD-2-Clause 5 */ 6 7#include "ConnectionFromClient.h" 8#include <LibCore/System.h> 9#include <LibGUI/Application.h> 10#include <LibIPC/MultiServer.h> 11#include <LibMain/Main.h> 12 13ErrorOr<int> serenity_main(Main::Arguments arguments) 14{ 15 TRY(Core::System::pledge("stdio recvfd sendfd accept rpath unix")); 16 17 auto app = TRY(GUI::Application::try_create(arguments)); 18 auto server = TRY(IPC::MultiServer<NotificationServer::ConnectionFromClient>::try_create()); 19 20 TRY(Core::System::unveil("/res", "r")); 21 TRY(Core::System::unveil(nullptr, nullptr)); 22 TRY(Core::System::pledge("stdio recvfd sendfd accept rpath")); 23 24 return app->exec(); 25}