diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-24 18:09:27 (GMT) |
---|---|---|
committer | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-24 18:09:27 (GMT) |
commit | 332562f44790556cdd4cb909a3a90052a12a6fc0 (patch) | |
tree | b8bd0d93881584cd45ac86c849012d3e223186a0 | |
parent | 9fade768c89e3fbb497ac2851fbf540c3f054757 (diff) | |
download | cpython-332562f44790556cdd4cb909a3a90052a12a6fc0.zip cpython-332562f44790556cdd4cb909a3a90052a12a6fc0.tar.gz cpython-332562f44790556cdd4cb909a3a90052a12a6fc0.tar.bz2 |
Keep ref to ECHILD in local scope (#16650)
-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 104d6ec..19a5188 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -1292,7 +1292,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. @@ -1308,7 +1308,7 @@ class Popen(object): 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 |