On 2 June 2016 at 09:51, Greg Kurz <gk...@linux.vnet.ibm.com> wrote:
> The readdir_r() function has a broken design and should not be used anymore.
> It is expected to be obsoleted in a future version of POSIX.1:
>
> http://austingroupbugs.net/view.php?id=696#c2857
>
> Glibc has already announced that 2.24 (scheduled for August 2016) will
> deprecates readdir_r() and encourages people to use readdir() with
> external synchronization instead.

> Since POSIX.1 will require readdir() to be thread-safe when employed on
> different directory streams, and glibc already does that, the choice
> was made to have per-directory locking.

AIUI the argument is that all sensible implementations of readdir()
already provide the thread-safety guarantees POSIX is going to
specify, but have you tested this on one of the BSDs or OSX?
(and/or checked their current readdir implementation...)

thanks
-- PMM

Reply via email to