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
F169000652: D27184.id79447.diff
Mon, Aug 31, 2:36 AM
Unknown Object (File)
Fri, Aug 28, 10:14 PM
Unknown Object (File)
Sat, Aug 15, 10:57 AM
Unknown Object (File)
Mon, Aug 10, 6:31 AM
Unknown Object (File)
Sun, Aug 9, 10:06 PM
Unknown Object (File)
Sat, Aug 8, 3:01 AM
Unknown Object (File)
Fri, Aug 7, 2:44 PM
Unknown Object (File)
Thu, Aug 6, 12:38 PM
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

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 34750
Build 31806: arc lint + arc unit