2020-10-03 10:55:51 -03:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2020, the SerenityOS developers.
|
|
|
|
|
*
|
2021-04-22 05:24:48 -03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-10-03 10:55:51 -03:00
|
|
|
*/
|
|
|
|
|
|
2022-02-25 07:18:30 -03:00
|
|
|
#include "ConnectionFromClient.h"
|
2020-10-03 10:55:51 -03:00
|
|
|
#include <LibCore/EventLoop.h>
|
|
|
|
|
#include <LibCore/LocalServer.h>
|
2021-11-23 06:59:50 -03:00
|
|
|
#include <LibCore/System.h>
|
2021-12-06 14:11:05 -03:00
|
|
|
#include <LibIPC/SingleServer.h>
|
2021-11-23 06:37:38 -03:00
|
|
|
#include <LibMain/Main.h>
|
2020-10-03 10:55:51 -03:00
|
|
|
|
2021-11-23 06:37:38 -03:00
|
|
|
ErrorOr<int> serenity_main(Main::Arguments)
|
2020-10-03 10:55:51 -03:00
|
|
|
{
|
|
|
|
|
Core::EventLoop event_loop;
|
2021-11-27 19:26:34 -03:00
|
|
|
TRY(Core::System::pledge("stdio unix rpath recvfd"));
|
2020-10-03 10:55:51 -03:00
|
|
|
|
2022-02-25 07:18:30 -03:00
|
|
|
auto client = TRY(IPC::take_over_accepted_client_from_system_server<LanguageServers::Shell::ConnectionFromClient>());
|
2021-12-06 14:11:05 -03:00
|
|
|
|
2021-11-27 19:26:34 -03:00
|
|
|
TRY(Core::System::pledge("stdio rpath recvfd"));
|
2021-11-23 06:59:50 -03:00
|
|
|
TRY(Core::System::unveil("/etc/passwd", "r"));
|
2021-06-11 14:54:42 -03:00
|
|
|
|
2020-10-03 10:55:51 -03:00
|
|
|
return event_loop.exec();
|
|
|
|
|
}
|