[Python-checkins] cpython (2.7): Keep ref to ECHILD in local scope (#16650)
andrew.svetlov
python-checkins at python.org
Mon Dec 24 19:09:44 CET 2012
http://hg.python.org/cpython/rev/a963dd401a63
changeset: 81022:a963dd401a63
branch: 2.7
parent: 81013:002d5f3b240d
user: Andrew Svetlov <andrew.svetlov at gmail.com>
date: Mon Dec 24 20:09:27 2012 +0200
summary:
Keep ref to ECHILD in local scope (#16650)
files:
Lib/subprocess.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -1292,7 +1292,7 @@
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.
@@ -1308,7 +1308,7 @@
except _os_error as e:
if _deadstate is not None:
self.returncode = _deadstate
- if e.errno == errno.ECHILD:
+ if 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
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list