Applied patch 1669481, slightly modified: Support close_fds on Win32
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index c2db6fa..e79159c 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -617,8 +617,16 @@
self.assertRaises(ValueError, subprocess.call,
[sys.executable,
"-c", "import sys; sys.exit(47)"],
+ stdout=subprocess.PIPE,
close_fds=True)
+ def test_close_fds(self):
+ # close file descriptors
+ rc = subprocess.call([sys.executable, "-c",
+ "import sys; sys.exit(47)"],
+ close_fds=True)
+ self.assertEqual(rc, 47)
+
def test_shell_sequence(self):
# Run command through the shell (sequence)
newenv = os.environ.copy()