mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:47:35 +00:00
ChessEngine: Use pledge and unveil
This commit is contained in:
parent
9f8a8e07c2
commit
328915a279
1 changed files with 13 additions and 0 deletions
|
@ -30,7 +30,20 @@
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
if (pledge("stdio shared_buffer accept unix rpath cpath fattr", nullptr) < 0) {
|
||||||
|
perror("pledge");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
Core::EventLoop loop;
|
Core::EventLoop loop;
|
||||||
|
if (pledge("stdio shared_buffer unix", nullptr) < 0) {
|
||||||
|
perror("pledge");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
if (unveil(nullptr, nullptr) < 0) {
|
||||||
|
perror("unveil");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
auto engine = ChessEngine::construct(Core::File::stdin(), Core::File::stdout());
|
auto engine = ChessEngine::construct(Core::File::stdin(), Core::File::stdout());
|
||||||
return loop.exec();
|
return loop.exec();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue