SIGN IN SIGN UP
python / cpython UNCLAIMED

The Python programming language

0 0 48 Python

Bug #1415

On Windows fileno(stdout) and fileno(stderr) can return an invalid file descriptor number (-2 on my machine). It happens only for pythonw.exe but not for python.exe.

Catch the problem ASAP in PyFile_NewStdPrinter(). I've also removed the call to PyErr_BadInternalCall(). It was causing a seg fault because the exceptions aren't available yet.
C
Christian Heimes committed
e018b305f6a4049b8832f712482cafec6beef5b7
Parent: 3ab4f65