]> git.ipfire.org Git - thirdparty/public-inbox.git/commit
treewide: use closedir after readdir for error checking
authorEric Wong <e@80x24.org>
Mon, 17 Nov 2025 21:53:49 +0000 (21:53 +0000)
committerEric Wong <e@80x24.org>
Thu, 20 Nov 2025 17:40:59 +0000 (17:40 +0000)
commitc856f9c5dd4562ac6f28fbcf1f4dc19b5cedcf98
tree4416ed027a6aa358997419a3c73e2f3aaaedd17b
parent7491a0fe540480acfbe479c86faa59bbb48c0678
treewide: use closedir after readdir for error checking

Hopefully...

Neither Perl's readdir nor readdir(3posix) documents EIO as a
possible error, nor does Linux getdents(3).  So relying on
readdir to detect errors via autodie(3perl) is not supported
nor possible, it seems.

Perl's closedir is supported by autodie and uses
closedir(3posix), which doesn't document EIO, either.  However,
closedir(3posix) will use close(3posix).  Thus in theory, EIO
can still be detected if a previous readdir failed.
lib/PublicInbox/Config.pm
lib/PublicInbox/ExtSearchIdx.pm
lib/PublicInbox/FakeInotify.pm
lib/PublicInbox/Inbox.pm
lib/PublicInbox/LeiSavedSearch.pm
lib/PublicInbox/MdirReader.pm
lib/PublicInbox/WWW.pm
lib/PublicInbox/Watch.pm
lib/PublicInbox/WwwStatic.pm
lib/PublicInbox/Xapcmd.pm