New submission from Charles-François Natali <neolo...@free.fr>: os.fdlistdir() closes the FD passed as argument. This is annoying, since in 99% of the cases you'd like to keep FD intact, so you end up doing os.fdlistdir(os.dup(fd)). Here's a patch that duplicates the FD in fdlistdir(), so that the original FD is kept intact, which is much more natural (at least to me :). That's an API change, but since fdlistdir() has been introduced in 3.3 which hasn't been released yet, I think it should be acceptable.
---------- components: Extension Modules files: fdlistdir_noclose.diff keywords: patch messages: 151023 nosy: neologix, pitrou, rosslagerwall priority: normal severity: normal status: open title: os.fdlistdir() should not close the file descriptor given in argument type: behavior versions: Python 3.3 Added file: http://bugs.python.org/file24194/fdlistdir_noclose.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13757> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com