freebsd-src/bin/cp
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 cp: tests: fix weird 20 insertion 2020-09-23 03:02:45 +00:00
cp.1 cp(1): Bugfixes for some issues reported by mandoc 2020-10-03 18:36:22 +00:00
cp.c fts_read: Handle error from a NULL return better. 2020-12-08 23:38:26 +00:00
extern.h
Makefile cp: add some basic tests 2020-09-23 03:01:14 +00:00
Makefile.depend
utils.c cp: fall back to read/write if copy_file_range fails 2020-09-11 20:49:36 +00:00