mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 14:19:48 +00:00
Userland: Make grep exit after hitting EOF on stdin
This commit is contained in:
parent
3eeb00b003
commit
12f214e2f0
Notes:
sideshowbarker
2024-07-19 00:38:24 +09:00
Author: https://github.com/ccapitalK
Commit: 12f214e2f0
Pull-request: https://github.com/SerenityOS/serenity/pull/4519
1 changed files with 1 additions and 1 deletions
|
@ -187,7 +187,7 @@ int main(int argc, char** argv)
|
||||||
|
|
||||||
if (!files.size() && !recursive) {
|
if (!files.size() && !recursive) {
|
||||||
auto stdin_file = Core::File::standard_input();
|
auto stdin_file = Core::File::standard_input();
|
||||||
for (;;) {
|
while (!stdin_file->eof()) {
|
||||||
auto line = stdin_file->read_line();
|
auto line = stdin_file->read_line();
|
||||||
bool is_binary = line.bytes().contains_slow(0);
|
bool is_binary = line.bytes().contains_slow(0);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue