Commit 88433c29 authored by Jason Madden's avatar Jason Madden

Copy the STARTUPINFO. Fixes #1352 and fixes #1351.

parent d0e04658
......@@ -16,6 +16,9 @@
- gevent is now compiled with Cython 0.29.6 and cffi 1.12.2
- Python 3.7 subprocess: Copy a ``STARTUPINFO`` passed as a parameter.
Contributed by AndCycle in :pr:`1352`.
1.4.0 (2019-01-04)
==================
......
......@@ -13,8 +13,8 @@ greenlet>=0.4.14 ; platform_python_implementation == "CPython"
pylint>=1.8.0 ; python_version < "3.4"
# pylint 2 needs astroid 2; unfortunately, it uses `typed_ast`
# which has a C extension that doesn't build on PyPy
pylint >= 2.1.1 ; python_version >= "3.4" and platform_python_implementation == "CPython"
astroid >= 2.0.2 ; python_version >= "3.4" and platform_python_implementation == "CPython"
pylint >= 2.3.1 ; python_version >= "3.4" and platform_python_implementation == "CPython"
astroid >= 2.2.5 ; python_version >= "3.4" and platform_python_implementation == "CPython"
# See version requirements in setup.py
cffi >= 1.12.2 ; platform_python_implementation == "CPython"
......
......@@ -958,6 +958,10 @@ class Popen(object):
# Process startup details
if startupinfo is None:
startupinfo = STARTUPINFO()
elif hasattr(startupinfo, '_copy'):
# bpo-34044: Copy STARTUPINFO since it is modified below,
# 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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment