Keep ref to ECHILD in local scope (#16650)
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 @@
 
 
         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