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
We can probably safely replace it with readdir, but should check documentation on OS X and FreeBSD to be sure. Switching away from it would help avoid problems like #54.
The text was updated successfully, but these errors were encountered:
Sorry, I was vague. The question is whether we can count on it being thread-safe. Neither of those man-pages seems mention that.
I can easily imagine a thread-safe implementation and don't know why any non-ancient implementation wouldn't be thread-safe, but it'd be nice to know for sure.
readdir is thread-safe if and only if the directory stream, on which it is called is unique to the thread. If however the directory stream is shared among multiple threads, which are simultaneously accessing readdir, bad things may happen.
Turns out
readdir_r
was deprecated around a year ago: https://lwn.net/Articles/696474/We can probably safely replace it with
readdir
, but should check documentation on OS X and FreeBSD to be sure. Switching away from it would help avoid problems like #54.The text was updated successfully, but these errors were encountered: