New submission from Rock Li:
When I'm how glob module is implemented. I found in file posixmodule.c, the
function posix_listdir is using readdir to get all the entries under one
directory and the context is setted to allow multi threads. But the function
readdir is not thread-safe,
Rock Li added the comment:
Hi Ross,
What about if one implementation of posix use the global variable to store
something. From `man readdir`, I didn't see the sentence "This data is not
overwritten by another call to readdir() on a different directory stream.".
And from the
Rock Li added the comment:
You are right. I checked the GLibc implementation of readdir and readdir_r,
there's no global variale used in the function readdir. Just as the POSIX
standards says, "This data is not overwritten by another call to readdir() on a
different directory str