[Resend to the whole list, sorry Florian for private message] On Sat, Mar 25, 2017 at 1:20 PM, Yann Ylavic <ylavic....@gmail.com> wrote: > > Right, modern readdir()s seem to be thread-safe but with regard to > different directories only, at least Linux' man page states: > "In the current POSIX.1 specification (POSIX.1-2008), > readdir() is not required to be thread-safe. However, in modern > implementations (including the glibc implementation), concurrent calls > to readdir() that specify different directory streams are thread-safe. > In cases where multiple threads must read from the same directory > stream, using readdir() with external synchronization is still > preferable to the use of the deprecated readdir_r(3) function. It is > expected that a future version of POSIX.1 will require that readdir() > be thread-safe when concurrently employed on different directory > streams."
Maybe we could simply forward this requirement (external synchronization) in the definition/usage of apr_dir_read()...