[issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program
Mateusz Loskot
report at bugs.python.org
Wed Sep 11 18:01:54 CEST 2013
Mateusz Loskot added the comment:
On 11 September 2013 12:34, Antoine Pitrou <report at bugs.python.org> wrote:
>> I'm not sure which minor version of Python 3.2 it was, but in my
>> comment in msg187362, I confirmed that I have tested the later
>> version with added is_valid_fd function. As far as I understand, the
>> changes in http://hg.python.org/cpython/rev/f15943505db0/ introduce
>> that is_valid_fd function, which does not seem to solve the problem.
>
> Could you try to investigate this a bit further? Does is_valid_fd()
> return true, and why?
I have already checked that (see msg187362)
Shortly, is_valid_fd always returns true because fd < 0 is always
false as my tests with Visual Studio 2012 (Visual C++ 11.0 (1700)
confirmed (see also bug report linked in msg188117)
assert(fdi == 0);
assert(fdo == 1);
assert(fde == 2);
IOW, fd is always larger than 0.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17797>
_______________________________________
More information about the Python-bugs-list
mailing list