diff -r 0238cc842805 Lib/subprocess.py --- a/Lib/subprocess.py Thu Dec 06 17:49:58 2012 -0500 +++ b/Lib/subprocess.py Sun Dec 09 09:01:50 2012 +0200 @@ -1452,7 +1452,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. @@ -1468,7 +1468,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