[issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program

Tomasz Wasilczyk report at bugs.python.org
Thu Jan 29 14:15:32 CET 2015


Tomasz Wasilczyk added the comment:

It seems that bug remains *not* fixed.

Just like eaducac pointed out, there are cases when underlying file handle is -2, which is not a valid file handle, but *is* a valid handle (which is GetCurrentThread).

Thus, provided dup solution accepts it, while it shouldn't. However, suggested GetStdHandle check still doesn't work for me. While working on the related Spoon issue, I've worked out a working solution (see the patch attached).

Tomek,
Spoon.net dev

----------
keywords: +patch
nosy: +twasilczyk at spoon
Added file: http://bugs.python.org/file37907/python-3.3.5-fdvalidation.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17797>
_______________________________________


More information about the Python-bugs-list mailing list