freebsd-skq/usr.bin/grep
Bryan Drewery 2dfa4b66b3 fts_read: Handle error from a NULL return better.
This is addressing cases such as fts_read(3) encountering an [EIO]
from fchdir(2) when FTS_NOCHDIR is not set.  That would otherwise be
seen as a successful traversal in some of these cases while silently
discarding expected work.

As noted in r264201, fts_read() does not set errno to 0 on a successful
EOF so it needs to be set before calling it.  Otherwise we might see
a random error from one of the iterations.

gzip is ignoring most errors and could be improved separately.

Reviewed by:	vangyzen
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D27184
2020-12-08 23:38:26 +00:00
..
tests bsdgrep(1): add some basic tests for some GNU Extension support 2019-09-03 18:32:29 +00:00
file.c Fix -Wpointer-sign warnings in usr.bin/grep 2020-09-21 09:03:37 +00:00
grep.1 grep(1): Add more EXAMPLES 2020-11-19 18:58:15 +00:00
grep.c Retire GNU_GREP_COMPAT knob 2020-12-05 02:21:58 +00:00
grep.h bsdgrep(1): Slooowly peel away the chunky onion 2018-06-08 01:25:07 +00:00
Makefile bsdgrep: don't link against libregex for bootstrap 2020-12-06 17:45:42 +00:00
Makefile.depend Update Makefile.depend files 2019-12-11 17:37:53 +00:00
Makefile.depend.options Add Makefile.depend.options 2019-12-11 17:37:37 +00:00
queue.c various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
util.c fts_read: Handle error from a NULL return better. 2020-12-08 23:38:26 +00:00
zgrep.1 Fix some regressions with the zgrep(1) wrapper. 2020-07-20 23:57:53 +00:00
zgrep.sh bzgrep: make flag --no-filename work 2020-11-20 09:56:46 +00:00