- Always update term_sent_at when sending stop signal, not just when
unset. This ensures the KILL_DELAY countdown resets properly when
multiple stop/restart commands are issued.
- Add duplicate restart detection: if a process is already terminating
with keepalive=true (restart scheduled), ignore subsequent restart
requests. This prevents race conditions with zmwatch.pl which may
detect stale heartbeat/shared memory during the restart window and
send duplicate restart commands.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>