-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
readdir_r is deprecated as of glibc-2.24 #34668
Copy link
Copy link
Closed
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Per bug 19056, glibc-2.24 has deprecated
readdir_randreaddir64_rin favor of plainreaddirandreaddir64. The reasons are discussed on the updated manpage.It states that
readdiris already thread-safe in "modern" implementations, including glibc. We should see if all platforms targeted byunix/fs.rssatisfy this. Note that the Solaris (Illumos) port is already using plainreaddir.It requires external synchronization if a particular directory stream may be shared among threads, but I believe we avoid that naturally from the lack of
&mutaliasing.DirisSync, but onlyReadDiraccesses it, and only from its mutableIteratorimplementation.