Skip to content

Commit 053dab5

Browse files
kumaraditya303miss-islington
authored andcommitted
pythonGH-98407: fix test_kill_issue43884 to not leak child processes (pythonGH-98491)
(cherry picked from commit 3b2724a) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
1 parent 3f6cfc5 commit 053dab5

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎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)