buffered-io: also check for interrupts in readline

This allows us to more reliable interrupt nix-eval-jobs
This commit is contained in:
Jörg Thalheim 2023-12-17 12:44:23 +01:00 committed by mergify[bot]
parent 4a1123c42d
commit e3d71921c3

View file

@ -51,6 +51,8 @@ LineReader::LineReader(LineReader &&other) {
return {}; // Return an empty string_view in case of error return {}; // Return an empty string_view in case of error
} }
nix::checkInterrupt();
// Remove trailing newline // Remove trailing newline
return std::string_view(buffer, read - 1); return std::string_view(buffer, read - 1);
} }