STINNER Victor added the comment: > Did you encounter this in real life?
Well, my initial concern was that dup() creates an inheritable file descriptor. It is unlikely that fork() occurs while is_valid_fd() is called, because is_valid_fd() is only called early during Python initialization. Replacing dup() with _Py_dup() would be overkill: _Py_dup() releases the GIL and raises an exception, which is not needed here. I'm closing the issue. I will reopen it if I find a simple solution to this non-issue :-) ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18804> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com