Skip to content

graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs

Python

Fix issue regression process cleanup on Windows

justrachc0bbe31c5cfb
diff --git a/scripts/test-issue-acp.py b/scripts/test-issue-acp.py
index be6e6119..0bb4084d 100644
--- a/scripts/test-issue-acp.py
+++ b/scripts/test-issue-acp.py
@@ -82,13 +82,19 @@ def last_user(request: dict) -> str:
def terminate(process: subprocess.Popen) -> None:
if process.poll() is None:
try:
- os.killpg(process.pid, signal.SIGTERM)
+ if os.name == "nt":
+ process.terminate()
+ else:
+ os.killpg(process.pid, signal.SIGTERM)
except ProcessLookupError:
pass
try:
process.wait(timeout=5)
except subprocess.TimeoutExpired:
- os.killpg(process.pid, signal.SIGKILL)
+ if os.name == "nt":
+ process.kill()
+ else:
+ os.killpg(process.pid, signal.SIGKILL)
process.wait(timeout=5)
for pipe in (process.stdin, process.stdout):
if pipe: