[issue25789] py launcher stderr is not piped to subprocess.Popen.stderr

Eryk Sun report at bugs.python.org
Thu Dec 3 13:50:47 EST 2015


Eryk Sun added the comment:

The error() function in PC/launcher.c should call exit(rc) instead of ExitProcess(rc). This allows the CRT to terminate properly and flush the stderr FILE stream. With this change it works as expected:

    >>> import subprocess
    >>> p = subprocess.Popen(r'amd64\py_d -3.7', stderr=subprocess.PIPE)
    >>> p.stderr.read()
    b'Requested Python version (3.7) not installed\r\n'

----------
keywords: +patch
nosy: +eryksun
stage:  -> patch review
Added file: http://bugs.python.org/file41228/issue25789_1.patch

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


More information about the Python-bugs-list mailing list