mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #8780: Fix a regression introduced by r78946 in subprocess on Windows
Ensure that stdout / stderr is inherited from the parent if stdout=PIPE / stderr=PIPE is not used.
This commit is contained in:
parent
f978facc0e
commit
b369358ee4
2 changed files with 12 additions and 1 deletions
|
@ -843,7 +843,7 @@ class Popen(object):
|
|||
# Process startup details
|
||||
if startupinfo is None:
|
||||
startupinfo = STARTUPINFO()
|
||||
if None not in (p2cread, c2pwrite, errwrite):
|
||||
if -1 not in (p2cread, c2pwrite, errwrite):
|
||||
startupinfo.dwFlags |= _subprocess.STARTF_USESTDHANDLES
|
||||
startupinfo.hStdInput = p2cread
|
||||
startupinfo.hStdOutput = c2pwrite
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue