summaryrefslogtreecommitdiffstats
path: root/Lib/subprocess.py
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-24 18:06:35 (GMT)
committerAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-24 18:06:35 (GMT)
commit08bab072917c2eeea3a0f3da0546d57cf5072bcf (patch)
treeffdafa9972f8507f586a1bc55166c7ccf6ec7907 /Lib/subprocess.py
parent8a495a48a53369120e7ca3b57efe9a07745ea067 (diff)
downloadcpython-08bab072917c2eeea3a0f3da0546d57cf5072bcf.zip
cpython-08bab072917c2eeea3a0f3da0546d57cf5072bcf.tar.gz
cpython-08bab072917c2eeea3a0f3da0546d57cf5072bcf.tar.bz2
Keep ref to ECHILD in local scope (#16650)
Diffstat (limited to 'Lib/subprocess.py')
-rw-r--r--Lib/subprocess.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index a322829..f32f081e 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -1411,7 +1411,7 @@ class Popen(object):
def _internal_poll(self, _deadstate=None, _waitpid=os.waitpid,
- _WNOHANG=os.WNOHANG, _os_error=os.error):
+ _WNOHANG=os.WNOHANG, _os_error=os.error, _ECHILD=errno.ECHILD):
"""Check if child process has terminated. Returns returncode
attribute.
@@ -1427,7 +1427,7 @@ class Popen(object):
except _os_error as e:
if _deadstate is not None:
self.returncode = _deadstate
- elif e.errno == errno.ECHILD:
+ elif e.errno == _ECHILD:
# This happens if SIGCLD is set to be ignored or
# waiting for child processes has otherwise been
# disabled for our process. This child is dead, we