Userland: Make grep exit after hitting EOF on stdin

This commit is contained in:
Sahan Fernando 2020-12-24 23:10:49 +11:00 committed by Andreas Kling
parent 3eeb00b003
commit 12f214e2f0
Notes: sideshowbarker 2024-07-19 00:38:24 +09:00

View file

@ -187,7 +187,7 @@ int main(int argc, char** argv)
if (!files.size() && !recursive) {
auto stdin_file = Core::File::standard_input();
for (;;) {
while (!stdin_file->eof()) {
auto line = stdin_file->read_line();
bool is_binary = line.bytes().contains_slow(0);