HomeFreeBSD

fts_read: Handle error from a NULL return better.

Description

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

Details

Provenance
bdreweryAuthored on Dec 8 2020, 11:38 PM
Parents
rGf1b18a668deb: cpuset_set{affinity,domain}: do not allow empty masks
Branches
Unknown
Tags
Unknown