Skip to content

Commit 65a9680

Browse files
committed
Modify windows kill to go after tree
1 parent f695dca commit 65a9680

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

choreographer/utils/_kill.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
def kill(process: subprocess.Popen[bytes]) -> None:
88
if platform.system() == "Windows":
99
subprocess.call( # noqa: S603, false positive, input fine
10-
["taskkill", "/F", "/T", "/PID", str(process.pid)], # noqa: S607 windows full path...
10+
["taskkill", "/IM", "/F", "/T", "/PID", str(process.pid)], # noqa: S607 windows full path...
1111
stderr=subprocess.DEVNULL,
1212
stdout=subprocess.DEVNULL,
1313
)

tests/test_process.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ async def test_watchdog(headless):
7777
if platform.system() == "Windows":
7878
# Blocking process here because it ensures the kill will occur rn
7979
subprocess.call( # noqa: S603, ASYNC221 sanitize input, blocking process
80-
["taskkill", "/F", "/T", "/PID", str(browser.subprocess.pid)], # noqa: S607
80+
["taskkill", "/IM", "/F", "/T", "/PID", str(browser.subprocess.pid)], # noqa: S607
8181
stderr=subprocess.DEVNULL,
8282
stdout=subprocess.DEVNULL,
8383
)

0 commit comments

Comments
 (0)