Commit Graph
1 Commits
Author SHA1 Message Date
KorenKritaandGitHub b3add07ad7 fix: detect stale PID in runner state after abnormal shutdown (#931)
* fix: verify PID belongs to hapi before treating runner as alive

After OS upgrade, stale runner.state.json PID can be reused by unrelated
processes. The old kill(pid, 0) check passes for any process, causing
start-sync to loop with 'Runner already running' indefinitely.

Now uses ps/wmic to confirm the process command line contains 'hapi'
before considering the runner alive. Falls back to alive-only check if
ps/wmic fails.

* fix: precise runner process detection and wmic fallback

* fix: add fallback for ps failure in non-Windows branch
2026-06-18 10:11:02 +08:00