2020-02-16 15:28:08 -03:00
|
|
|
/*
|
2021-11-23 11:28:41 -03:00
|
|
|
* Copyright (c) 2020-2021, Andreas Kling <kling@serenityos.org>
|
2020-02-16 15:28:08 -03:00
|
|
|
*
|
2021-04-22 05:24:48 -03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-02-16 15:28:08 -03:00
|
|
|
*/
|
|
|
|
|
|
2022-02-25 07:18:30 -03:00
|
|
|
#include "ConnectionFromClient.h"
|
2021-11-23 11:28:41 -03:00
|
|
|
#include <LibCore/System.h>
|
2020-02-16 15:28:08 -03:00
|
|
|
#include <LibGUI/Application.h>
|
2021-12-06 13:54:11 -03:00
|
|
|
#include <LibIPC/MultiServer.h>
|
2021-11-23 11:28:41 -03:00
|
|
|
#include <LibMain/Main.h>
|
2020-02-16 15:28:08 -03:00
|
|
|
|
2021-11-23 11:28:41 -03:00
|
|
|
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
2020-02-16 15:28:08 -03:00
|
|
|
{
|
2021-11-27 19:26:34 -03:00
|
|
|
TRY(Core::System::pledge("stdio recvfd sendfd accept rpath unix"));
|
2020-02-16 15:28:08 -03:00
|
|
|
|
2021-11-23 11:28:41 -03:00
|
|
|
auto app = TRY(GUI::Application::try_create(arguments));
|
2022-02-25 07:18:30 -03:00
|
|
|
auto server = TRY(IPC::MultiServer<NotificationServer::ConnectionFromClient>::try_create());
|
2020-02-16 15:28:08 -03:00
|
|
|
|
2021-11-23 11:28:41 -03:00
|
|
|
TRY(Core::System::unveil("/res", "r"));
|
|
|
|
|
TRY(Core::System::unveil(nullptr, nullptr));
|
2021-11-27 19:26:34 -03:00
|
|
|
TRY(Core::System::pledge("stdio recvfd sendfd accept rpath"));
|
2020-02-16 15:28:08 -03:00
|
|
|
|
2020-07-04 09:05:19 -03:00
|
|
|
return app->exec();
|
2020-02-16 15:28:08 -03:00
|
|
|
}
|