mirror of https://github.com/garrytan/gstack.git
On Windows, isProcessAlive() shelled out to `tasklist` via Bun.spawnSync. Windows gives that child its own console window, so the terminal-agent watchdog's per-tick existence check (default 60s) flashed a conhost.exe window for the entire headed session — purely cosmetic but a constant, unexplained blink (#1952). macOS/Linux stayed silent because their branch is a `process.kill(pid, 0)` syscall that spawns nothing. Unify on signal-0 across all platforms — exactly what the parent watchdog two functions away already does. Node/Bun implement `process.kill(pid, 0)` on Windows via OpenProcess: a pure existence check, no child process, no window. This also fixes a latent correctness edge: the old branch collapsed every error to false, so a live-but-unsignalable process (EPERM) read as dead. Now ESRCH -> dead, EPERM -> alive. Tests: existing alive/dead probes still pass; add an EPERM-as-alive case and a static tripwire asserting the probe never reintroduces `tasklist`/spawn (proven to fail on the old body). 9/9 green in error-handling.test.ts. Fixes #1952 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| bin | ||
| scripts | ||
| src | ||
| test | ||
| PLAN-snapshot-dropdown-interactive.md | ||
| SKILL.md | ||
| SKILL.md.tmpl | ||