Марк Коренберг added the comment: Calling getdents()/readdir64() repeatedly while closing descriptors provides unexpected behaviour. Reading directory while it modified is not safe by default. For example: http://en.it-usenet.org/thread/18514/15719/.
So, we should re-open directory if we received full array of structures. I don't know if just lseek(dirfd, 0) sufficies. Please reopen bug, as Linux behaviour of stable reading /proc/<pid>/fd may be broken in future without any error at python side (!) (typically, second call returns empty list if dir was modified) ---------- nosy: +mmarkk _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8052> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com