]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-98407: fix `test_kill_issue43884` to not leak child processes (#98491)
authorKumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Mon, 24 Oct 2022 17:50:35 +0000 (23:20 +0530)
committerGitHub <noreply@github.com>
Mon, 24 Oct 2022 17:50:35 +0000 (10:50 -0700)
Lib/test/test_asyncio/test_subprocess.py

index fe1d060c77d4c745bea72d8d536feba55c470fe8..20bca3e6b72736dd100255dc93bac5feef45c228 100644 (file)
@@ -184,7 +184,10 @@ class SubprocessMixin:
             self.assertEqual(-signal.SIGKILL, returncode)
 
     def test_kill_issue43884(self):
-        blocking_shell_command = f'{sys.executable} -c "import time; time.sleep(100000000)"'
+        if sys.platform == 'win32':
+            blocking_shell_command = f'{sys.executable} -c "import time; time.sleep(100000000)"'
+        else:
+            blocking_shell_command = 'sleep 1; sleep 1'
         creationflags = 0
         if sys.platform == 'win32':
             from subprocess import CREATE_NEW_PROCESS_GROUP