mirror of
https://git.freebsd.org/src.git
synced 2026-01-16 23:02:24 +00:00
grep: Suppress EISDIR when reading.
MFC after: 1 week Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Reviewed by: kevans
This commit is contained in:
parent
1621861810
commit
caf5283fc9
1 changed files with 2 additions and 0 deletions
|
|
@ -72,6 +72,8 @@ grep_refill(struct file *f)
|
|||
bufrem = 0;
|
||||
|
||||
nr = read(f->fd, buffer, MAXBUFSIZ);
|
||||
if (nr < 0 && errno == EISDIR)
|
||||
nr = 0;
|
||||
if (nr < 0)
|
||||
return (-1);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue