-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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.
Description
Per bug 19056, glibc-2.24 has deprecated readdir_r
and readdir64_r
in favor of plain readdir
and readdir64
. The reasons are discussed on the updated manpage.
It states that readdir
is already thread-safe in "modern" implementations, including glibc. We should see if all platforms targeted by unix/fs.rs
satisfy this. Note that the Solaris (Illumos) port is already using plain readdir
.
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 &mut
aliasing. Dir
is Sync
, but only ReadDir
accesses it, and only from its mutable Iterator
implementation.
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.