Page MenuHomeFreeBSD

fts_read: Handle error from a NULL return better.
ClosedPublic

Authored by bdrewery on Nov 11 2020, 11:42 PM.
Tags
None
Referenced Files
F132358220: D27184.diff
Thu, Oct 16, 5:13 AM
Unknown Object (File)
Mon, Oct 13, 3:12 PM
Unknown Object (File)
Thu, Oct 9, 8:01 AM
Unknown Object (File)
Thu, Sep 18, 12:16 PM
Unknown Object (File)
Sep 16 2025, 9:03 AM
Unknown Object (File)
Sep 11 2025, 10:14 PM
Unknown Object (File)
Aug 19 2025, 9:30 AM
Unknown Object (File)
Aug 15 2025, 3:55 AM
Subscribers

Details

Summary

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.

Sponsored by: Dell EMC

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable