You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Ubuntu 16.10, it became clear that readdir_r is being deprecated. See the manpage for readdir_r (or see www manpage for further details.
Basically, while readdir_r was supposed to be thread-safe (and is), it has a host of problems with the interface. Future plans are to make readdir thread-safe (possibly through external synchronization), and suggest that people use that instead.
Note that use of readdir_r, by default, triggers a compiler warning on Ubuntu 16.10.
Note that there are actually TWO readdir_r functions:
readdir_r (section 3 of manpage), that has the problems specified above, and
readdir_r (section 2 of manpage), that isn't intended to be called directly, and is only reachable via the _syscall3 interface - and there is no glibc convenience function for this). Note that readdir_r (2) has been superseded by getdents (2), which allows getting multiple directory entries in one call.
Because of our universal images, we'll likely need to define our own version of readdir that we guarantee to be thread safe that basically re-implements readdir_r (3) using underlying readdir_r (2) or getdents (2) interfaces. We will need to test such an interface via a universal binary and verify that it runs on all of the Linux platforms that we care about, even when built on an old system.
The text was updated successfully, but these errors were encountered:
jeffaco
changed the title
The Posix function readdir_r is being deprecated
The posix function readdir_r is being deprecated
Dec 16, 2016
On Ubuntu 16.10, it became clear that
readdir_r
is being deprecated. See the manpage forreaddir_r
(or see www manpage for further details.Basically, while
readdir_r
was supposed to be thread-safe (and is), it has a host of problems with the interface. Future plans are to makereaddir
thread-safe (possibly through external synchronization), and suggest that people use that instead.Note that use of
readdir_r
, by default, triggers a compiler warning on Ubuntu 16.10.Note that there are actually TWO
readdir_r
functions:readdir_r
(section 3 of manpage), that has the problems specified above, andreaddir_r
(section 2 of manpage), that isn't intended to be called directly, and is only reachable via the_syscall3
interface - and there is no glibc convenience function for this). Note thatreaddir_r
(2) has been superseded bygetdents
(2), which allows getting multiple directory entries in one call.Because of our universal images, we'll likely need to define our own version of readdir that we guarantee to be thread safe that basically re-implements
readdir_r
(3) using underlyingreaddir_r
(2) orgetdents
(2) interfaces. We will need to test such an interface via a universal binary and verify that it runs on all of the Linux platforms that we care about, even when built on an old system.The text was updated successfully, but these errors were encountered: