[issue1415] py3k: pythonw.exe fails because std streams a missing

Christian Heimes report at bugs.python.org
Sat Nov 10 15:44:46 CET 2007


Christian Heimes added the comment:

Congratulations Amaury and welcome on board! :)

I like to get your opinion on the problem. So far I've figured out that
Windows doesn't create the std streams for Windows WinMain() programs.
As first step towards the solution I like to separate the close check
from the fd. Currently Module/_fileio.c:file_close() sets the fd to a
negative value and open fails immediately with a negative fd. I want to
add a closed flag to the struct and move the fd < 0 check to the read
and write operations.

That's going to fix stdin and stdout for non console based programs on
Windows. For stderr I've to think about a better solution to avoid an
infinite loop (stderr.write() -> exception -> stderr.write() ...). Maybe
I could add some more methods to the dumb writer to make it more file
like and use it?

----------
nosy: +amaury.forgeotdarc
title: py3k: pythonw.exe fails to run -> py3k: pythonw.exe fails because std streams a missing

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1415>
__________________________________


More information about the Python-bugs-list mailing list