diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-24 18:06:52 (GMT) |
---|---|---|
committer | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-24 18:06:52 (GMT) |
commit | 5b187ce700ab17bd41b419e03235a6de96441c4c (patch) | |
tree | 6b62f7a5ad396cfe71e3f441848b70a17e558ede /Lib/subprocess.py | |
parent | 7174f0883cde6295ae5cc8797bab63f69ca550e3 (diff) | |
parent | 08bab072917c2eeea3a0f3da0546d57cf5072bcf (diff) | |
download | cpython-5b187ce700ab17bd41b419e03235a6de96441c4c.zip cpython-5b187ce700ab17bd41b419e03235a6de96441c4c.tar.gz cpython-5b187ce700ab17bd41b419e03235a6de96441c4c.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 d3d90ca..aa3e217 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -1452,7 +1452,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. @@ -1468,7 +1468,7 @@ class Popen(object): 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 |