mirror of
https://github.com/SerenityOS/serenity.git
synced 2026-11-07 12:38:38 -10:00
(cherry picked from commit 4fe21e6d87259718f2d2a727a479e780963d76f4; amended to add missing includes to various serenity components)
26 lines
776 B
C++
26 lines
776 B
C++
/*
|
|
* Copyright (c) 2021, Andreas Kling <[email protected]>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include "ConnectionFromClient.h"
|
|
#include <LibCore/EventLoop.h>
|
|
#include <LibCore/StandardPaths.h>
|
|
#include <LibCore/System.h>
|
|
#include <LibIPC/MultiServer.h>
|
|
#include <LibMain/Main.h>
|
|
|
|
ErrorOr<int> serenity_main(Main::Arguments)
|
|
{
|
|
TRY(Core::System::pledge("stdio accept rpath wpath cpath"));
|
|
TRY(Core::System::unveil(Core::StandardPaths::config_directory(), "rwc"sv));
|
|
TRY(Core::System::unveil(Core::StandardPaths::home_directory(), "rwc"sv));
|
|
TRY(Core::System::unveil(nullptr, nullptr));
|
|
|
|
Core::EventLoop event_loop;
|
|
|
|
auto server = TRY(IPC::MultiServer<ConfigServer::ConnectionFromClient>::try_create());
|
|
return event_loop.exec();
|
|
}
|