Eryk Sun added the comment:
Patch 2 additionally modifies run_child to call exit() instead of ExitProcess.
For example:
>>> import os, subprocess
>>> os.environ['PYLAUNCH_DEBUG'] = '1'
>>> p = subprocess.Popen(r'py -3 -c ""', stderr=subprocess.PIPE,
stdout=subprocess.PIPE)
>>> p.stderr.read()
b''
Patched:
>>> p = subprocess.Popen(r'amd64\py_d -3 -c ""', stderr=subprocess.PIPE,
stdout=subprocess.PIPE)
>>> p.stderr.readlines()[-1]
b'child process exit code: 0\r\n'
For good measure I also added a call to setvbuf to disable buffering stderr.
----------
Added file: http://bugs.python.org/file41239/issue25789_2.patch
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue25789>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com