Skip to content

Commit

Permalink
Merge 94ec22f into 1b3ee13
Browse files Browse the repository at this point in the history
  • Loading branch information
AndCycle committed Feb 13, 2019
2 parents 1b3ee13 + 94ec22f commit 5360317
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/gevent/subprocess.py
Expand Up @@ -958,6 +958,12 @@ def _execute_child(self, args, executable, preexec_fn, close_fds,
# Process startup details
if startupinfo is None:
startupinfo = STARTUPINFO()
else:
# Support for Python >= 3.7
if hasattr(startupinfo, '_copy'):
# bpo-34044: Copy STARTUPINFO since it is modified above,
# so the caller can reuse it multiple times.
startupinfo = startupinfo._copy()
use_std_handles = -1 not in (p2cread, c2pwrite, errwrite)
if use_std_handles:
startupinfo.dwFlags |= STARTF_USESTDHANDLES
Expand Down

0 comments on commit 5360317

Please sign in to comment.