diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index 24c3bf96355..b5ad6bacaf7 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -671,14 +671,16 @@ def test_send_signal(self): self.assertNotEqual(p.wait(), 0) def test_kill(self): - p = subprocess.Popen([sys.executable, "-c", "input()"]) + p = subprocess.Popen([sys.executable, "-c", "input()"], + stdin=subprocess.PIPE, close_fds=True) self.assertIsNone(p.poll()) p.kill() self.assertEqual(p.wait(), -signal.SIGKILL) def test_terminate(self): - p = subprocess.Popen([sys.executable, "-c", "input()"]) + p = subprocess.Popen([sys.executable, "-c", "input()"], + stdin=subprocess.PIPE, close_fds=True) self.assertIsNone(p.poll()) p.terminate()