Serenity Operating System
1/*
2 * Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
3 *
4 * SPDX-License-Identifier: BSD-2-Clause
5 */
6
7#include "ConnectionFromClient.h"
8#include <LibCore/StandardPaths.h>
9#include <LibCore/System.h>
10#include <LibIPC/MultiServer.h>
11#include <LibMain/Main.h>
12
13ErrorOr<int> serenity_main(Main::Arguments)
14{
15 TRY(Core::System::pledge("stdio accept rpath wpath cpath"));
16 TRY(Core::System::unveil(Core::StandardPaths::config_directory(), "rwc"sv));
17 TRY(Core::System::unveil(Core::StandardPaths::home_directory(), "rwc"sv));
18 TRY(Core::System::unveil(nullptr, nullptr));
19
20 Core::EventLoop event_loop;
21
22 auto server = TRY(IPC::MultiServer<ConfigServer::ConnectionFromClient>::try_create());
23 return event_loop.exec();
24}