mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:28:11 +00:00

SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
30 lines
707 B
C++
30 lines
707 B
C++
/*
|
|
* Copyright (c) 2020, the SerenityOS developers.
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include "ChessEngine.h"
|
|
#include <LibCore/EventLoop.h>
|
|
#include <LibCore/File.h>
|
|
#include <unistd.h>
|
|
|
|
int main()
|
|
{
|
|
if (pledge("stdio recvfd sendfd accept unix rpath cpath fattr", nullptr) < 0) {
|
|
perror("pledge");
|
|
return 1;
|
|
}
|
|
Core::EventLoop loop;
|
|
if (pledge("stdio recvfd sendfd unix", nullptr) < 0) {
|
|
perror("pledge");
|
|
return 1;
|
|
}
|
|
if (unveil(nullptr, nullptr) < 0) {
|
|
perror("unveil");
|
|
return 1;
|
|
}
|
|
|
|
auto engine = ChessEngine::construct(Core::File::standard_input(), Core::File::standard_output());
|
|
return loop.exec();
|
|
}
|