mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:07:36 +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()
|
||||
{
|
||||
if (pledge("stdio shared_buffer accept unix rpath cpath fattr", nullptr) < 0) {
|
||||
perror("pledge");
|
||||
return 1;
|
||||
}
|
||||
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());
|
||||
return loop.exec();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue