fix(process-registry): suppress windows-footgun false positive on guarded killpg

Keep the existing POSIX-only process-group teardown path, but make the
signal selection explicit via getattr and add an inline windows-footgun
suppression marker on the guarded os.killpg line so the Windows footgun
check no longer blocks CI on this intentionally platform-gated code.
This commit is contained in:
Brooklyn Nicholson 2026-05-11 17:14:33 -04:00
parent d37ea68822
commit 3f013d289c

View file

@ -585,7 +585,8 @@ class ProcessRegistry:
try:
if not _IS_WINDOWS:
try:
os.killpg(os.getpgid(proc.pid), signal.SIGKILL)
kill_signal = getattr(signal, "SIGKILL", signal.SIGTERM)
os.killpg(os.getpgid(proc.pid), kill_signal) # windows-footgun: ok - guarded by _IS_WINDOWS above
except (ProcessLookupError, PermissionError, OSError):
proc.kill()
else: