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
Unknown Object (File)
Feb 29 2024, 4:13 AM
Unknown Object (File)
Feb 23 2024, 10:37 AM
Unknown Object (File)
Jan 21 2024, 8:42 AM
Unknown Object (File)
Jan 9 2024, 1:09 AM
Unknown Object (File)
Dec 20 2023, 6:07 AM
Unknown Object (File)
Dec 11 2023, 11:20 PM
Unknown Object (File)
Nov 29 2023, 4:58 AM
Unknown Object (File)
Nov 24 2023, 12:53 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