fix(ci): kill the Windows child via taskkill, not a signal

Review found kill -TERM against a native Windows binary (bun.exe)
under Git Bash is best-effort thread injection, not a real
signal, and can fail to land -- reproducing the exact hang this
watchdog exists to prevent. taskkill //F //T is a real
TerminateProcess call.

Also: cite the run id instead of a branch name (branches get
deleted), and add the missing shell: bash the repo's other
Windows steps already set explicitly.
This commit is contained in:
Miguel Angel Simon Sierra
2026-09-19 19:17:17 -04:00
parent 33145fa4b6
commit 7ff370de5c
3 changed files with 11 additions and 2 deletions
+9 -1
View File
@@ -18,7 +18,15 @@ run_with_timeout() {
local elapsed=0
while kill -0 "$pid" 2>/dev/null; do
if ((elapsed >= seconds)); then
kill -TERM "$pid" 2>/dev/null
# Git Bash's `kill -TERM` on a native Windows binary (bun.exe) is a
# best-effort thread-injection emulation, not a real signal, and can
# fail to land -- the exact hang this function exists to prevent.
# taskkill //T (kills the child tree) //F (TerminateProcess) is real.
if [[ "${OS:-}" == "Windows_NT" ]]; then
taskkill //F //T //PID "$pid" 2>/dev/null
else
kill -TERM "$pid" 2>/dev/null
fi
wait "$pid" 2>/dev/null
return 124
fi