Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The posix function readdir_r is being deprecated #150

Closed
jeffaco opened this issue Dec 16, 2016 · 1 comment
Closed

The posix function readdir_r is being deprecated #150

jeffaco opened this issue Dec 16, 2016 · 1 comment

Comments

@jeffaco
Copy link
Contributor

jeffaco commented Dec 16, 2016

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:

  1. readdir_r (section 3 of manpage), that has the problems specified above, and
  2. 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.

@jeffaco jeffaco changed the title The Posix function readdir_r is being deprecated The posix function readdir_r is being deprecated Dec 16, 2016
@palladia
Copy link
Contributor

palladia commented Aug 1, 2018

readdir_r() is not found in code. Closing.

@palladia palladia closed this as completed Aug 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants