fix(pty-bridge): mark os.killpg/getpgid windows-footgun-ok (POSIX-only module)

This commit is contained in:
teknium1 2026-06-08 06:52:22 -07:00 committed by Teknium
parent 8cb1908e18
commit cb13723f53

View file

@ -251,7 +251,7 @@ class PtyBridge:
self._closed = True
try:
pgid = os.getpgid(self._proc.pid)
pgid = os.getpgid(self._proc.pid) # windows-footgun: ok — POSIX-only module (imports fcntl/termios/ptyprocess at top)
except Exception:
pgid = None
@ -264,7 +264,7 @@ class PtyBridge:
break
try:
if pgid is not None:
os.killpg(pgid, sig)
os.killpg(pgid, sig) # windows-footgun: ok — POSIX-only module (imports fcntl/termios/ptyprocess at top)
else:
self._proc.kill(sig)
except Exception: