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

Jean-Charles Lefebvre report at bugs.python.org
Thu Mar 12 23:12:07 CET 2015


Jean-Charles Lefebvre added the comment:

Hi all, a small update to confirm this issue with version 3.5.0a2 embedded in a native C++ GUI application, having everything built with VS2013 SP4.

Same execution flow as described by Mateusz in msg198689.

I've modified Python/pylifecycle.c file according to Tomasz's attached patch.
It just "works for me" and I've just slightly modified the #ifdef line:

#if defined(MS_WINDOWS) && defined(HAVE_FSTAT) && defined(_MSC_VER) && _MSC_VER >= 1700 && _MSC_VER < 2000

It would definitely be nice to have this workaround applied to the 3.5 branch since MS' fix is lost in release cycle. Would it be too intrusive?

----------
nosy: +Jean-Charles Lefebvre
versions: +Python 3.5

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


More information about the Python-bugs-list mailing list