[issue17428] replace readdir to readdir_r in function posix_listdir

Rock Li report at bugs.python.org
Sat Mar 16 15:37:39 CET 2013


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 stream". 

To the second question, now I understood. POSIX does not specify the size of the d_name field. This will cause our codes a bit inconvenient.

Next time, I will check the POSIX specifications and related several implementations first, not just the documents.

Thx All.

----------
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17428>
_______________________________________


More information about the Python-bugs-list mailing list