[Python-checkins] cpython (merge 3.3 -> default): Keep ref to ECHILD in local scope (#16650)

andrew.svetlov python-checkins at python.org
Mon Dec 24 19:09:42 CET 2012


http://hg.python.org/cpython/rev/8f30461395b1
changeset: 81021:8f30461395b1
parent: 81018:33494e332e67
parent: 81020:0b1a49f99169
user: Andrew Svetlov <andrew.svetlov at gmail.com>
date: Mon Dec 24 20:08:53 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
@@ -1412,7 +1412,7 @@
 
 
 def _internal_poll(self, _deadstate=None, _waitpid=os.waitpid,
- _WNOHANG=os.WNOHANG):
+ _WNOHANG=os.WNOHANG, _ECHILD=errno.ECHILD):
 """Check if child process has terminated. Returns returncode
 attribute.
 
@@ -1428,7 +1428,7 @@
 except OSError 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

AltStyle によって変換されたページ (->オリジナル) /