[Python-checkins] cpython (3.2): Keep ref to ECHILD in local scope (#16650)
andrew.svetlov
python-checkins at python.org
Mon Dec 24 19:09:40 CET 2012
http://hg.python.org/cpython/rev/0cc4fe5634cf
changeset: 81019:0cc4fe5634cf
branch: 3.2
parent: 81009:ffe091ebd5de
user: Andrew Svetlov <andrew.svetlov at gmail.com>
date: Mon Dec 24 20:06:35 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
@@ -1411,7 +1411,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.
@@ -1427,7 +1427,7 @@
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
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list