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

Amaury Forgeot d'Arc report at bugs.python.org
Thu Sep 12 20:35:51 CEST 2013


Amaury Forgeot d'Arc added the comment:

> 2. _PyVerify_fd(fd) is always true. Given the current definition:
> #define _PyVerify_fd(fd) (_get_osfhandle(fd) >= 0)
> for those values of fd _get_osfhandle(fd) >= 0, always.

Hum, are you sure this is the selected implementation?
- this code is only in 2.7
  http://hg.python.org/cpython/file/v2.7/Include/fileobject.h#l73
- it's protected by #if statements. In your case the first case should be selected, can you verify if it's the case, and if not, why?

----------

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


More information about the Python-bugs-list mailing list