Charles-Francois Natali <neolo...@free.fr> added the comment: dup(2) returns the lowest numbered available file descriptor: if there's a discontinuity in the FDs allocation, this code is going to close only the FDs up to the first available FD. Imagine for example the following: open("/tmp/foo") = 3 open("/tmp/bar") = 4 close(3)
Then dup(0) will return 3, and not the max FD. ---------- nosy: +neologix _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11284> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com