Skip to content

Commit 3a1eb81

Browse files
GH-98407: fix test_kill_issue43884 to not leak child processes (GH-98491)
(cherry picked from commit 3b2724a) Co-authored-by: Kumar Aditya <[email protected]>
1 parent 69b6b56 commit 3a1eb81

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Lib/test/test_asyncio/test_subprocess.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,10 @@ def test_kill(self):
184184
self.assertEqual(-signal.SIGKILL, returncode)
185185

186186
def test_kill_issue43884(self):
187-
blocking_shell_command = f'{sys.executable} -c "import time; time.sleep(100000000)"'
187+
if sys.platform == 'win32':
188+
blocking_shell_command = f'{sys.executable} -c "import time; time.sleep(100000000)"'
189+
else:
190+
blocking_shell_command = 'sleep 1; sleep 1'
188191
creationflags = 0
189192
if sys.platform == 'win32':
190193
from subprocess import CREATE_NEW_PROCESS_GROUP

0 commit comments

Comments
 (0)