STINNER Victor <vstin...@redhat.com> added the comment:

In short, Python 2.7 doesn't seem to be affected by fstat/dup issues.

Python 2.7 doesn't check if file descriptors 0, 1 and 2 at startup. Python 2 
uses PyFile_FromFile() to create sys.stdin, sys.stdout and sys.stderr which 
create a "file" object. The function calls fstat(fd) but it ignores the error: 
fstat() is only used to fail if the fd is a directory.

Python 2.7 doesn't have the is_valid_fd() function.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32849>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to