diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-24 18:08:53 (GMT) |
---|---|---|
committer | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-24 18:08:53 (GMT) |
commit | 1d960fe4c4235907cdd056e09d19aa2c0963b4b5 (patch) | |
tree | 3059719827cebe9f4579a24b02234bf541726084 /Lib/subprocess.py | |
parent | 04a7e4432c61e1d622d00818c1de4b837174f30b (diff) | |
parent | 5b187ce700ab17bd41b419e03235a6de96441c4c (diff) | |
download | cpython-1d960fe4c4235907cdd056e09d19aa2c0963b4b5.zip cpython-1d960fe4c4235907cdd056e09d19aa2c0963b4b5.tar.gz cpython-1d960fe4c4235907cdd056e09d19aa2c0963b4b5.tar.bz2 |
Keep ref to ECHILD in local scope (#16650)
Diffstat (limited to 'Lib/subprocess.py')
-rw-r--r-- | Lib/subprocess.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py index 0c60be1..fd51048 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -1412,7 +1412,7 @@ class Popen(object): 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 @@ class Popen(object): 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 |