Serenity Operating System
at master 25 lines 685 B view raw
1/* 2 * Copyright (c) 2020, the SerenityOS developers. 3 * 4 * SPDX-License-Identifier: BSD-2-Clause 5 */ 6 7#include "ConnectionFromClient.h" 8#include <LibCore/EventLoop.h> 9#include <LibCore/LocalServer.h> 10#include <LibCore/System.h> 11#include <LibIPC/SingleServer.h> 12#include <LibMain/Main.h> 13 14ErrorOr<int> serenity_main(Main::Arguments) 15{ 16 Core::EventLoop event_loop; 17 TRY(Core::System::pledge("stdio unix rpath recvfd")); 18 19 auto client = TRY(IPC::take_over_accepted_client_from_system_server<LanguageServers::Shell::ConnectionFromClient>()); 20 21 TRY(Core::System::pledge("stdio rpath recvfd")); 22 TRY(Core::System::unveil("/etc/passwd", "r")); 23 24 return event_loop.exec(); 25}