summaryrefslogtreecommitdiff
path: root/src/grep.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/grep.c')
-rw-r--r--src/grep.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/grep.c b/src/grep.c
index ae5e941..9f367cc 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -185,6 +185,10 @@ process_stdin:
}
}
}
+ if (ferror(f) && !(flags & FLAG_s)) {
+ fprintf(stderr, "%s: ", argv[0]);
+ perror(filename);
+ }
if (flags & FLAG_c) {
if (multifile)
printf("%s:%lld\n", filename, count);