summaryrefslogtreecommitdiff
path: root/Userland/Services
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Services')
-rw-r--r--Userland/Services/ChessEngine/main.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Userland/Services/ChessEngine/main.cpp b/Userland/Services/ChessEngine/main.cpp
index 81975d2feb..c12fce6efd 100644
--- a/Userland/Services/ChessEngine/main.cpp
+++ b/Userland/Services/ChessEngine/main.cpp
@@ -16,7 +16,11 @@ ErrorOr<int> serenity_main(Main::Arguments)
Core::EventLoop loop;
TRY(Core::System::unveil(nullptr, nullptr));
- auto engine = TRY(ChessEngine::try_create(TRY(Core::File::standard_input()), TRY(Core::File::standard_output())));
+ auto infile = TRY(Core::File::standard_input());
+ TRY(infile->set_blocking(false));
+ auto outfile = TRY(Core::File::standard_output());
+ TRY(outfile->set_blocking(false));
+ auto engine = TRY(ChessEngine::try_create(move(infile), move(outfile)));
engine->on_quit = [&](auto status_code) {
loop.quit(status_code);
};