Issue #18174: Fix fd leaks in tests.
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index e89d84f..f43b51c 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -806,7 +806,8 @@
                         self._testcase.assertNotIn(
                                 fd, (p2cwrite, c2pread, errread))
                 finally:
-                    map(os.close, devzero_fds)
+                    for fd in devzero_fds:
+                        os.close(fd)
 
     @unittest.skipIf(not os.path.exists("/dev/zero"), "/dev/zero required.")
     def test_preexec_errpipe_does_not_double_close_pipes(self):