fix(update): the legacy start_watchdog matches the monitor exactly too; a restart is reported only when the monitor runs (Issue #72, review round 4)
With MAM_DELEGATION_PY=0 the legacy helper still found the monitor with an unanchored pgrep -f, so a process that only named the monitor path was reported as the restarted monitor and none was started. lib.sh _monitor_pids is the shell twin of daemon.find_running; update.sh and post_update.sh check the PID start_watchdog printed with mam_monitor_started before saying "monitor: restarted". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
cf1b693e85
commit
1d63e882bc
5 files changed
+103
-12
No files matched your search
@@ -42,8 +42,8 @@ def find_running(monitor_script: str) -> List[str]:
|
||||
|
||||
A subscriber is a process whose command line is `<bash> <monitor_script>
|
||||
--subscribe[ ...]`, argv0 a bash, as both this module and the shell helper
|
||||
start it. Issue #72: matched exactly, not as the shell helper's `pgrep -f`
|
||||
regex, because the update skill signals what this returns - a daemon of
|
||||
start it. Issue #72: matched exactly (lib.sh _monitor_pids is the shell
|
||||
twin the legacy helper uses), not as a `pgrep -f` regex, because the update skill signals what this returns - a daemon of
|
||||
another workspace the unescaped path also matched, or a process that only
|
||||
names the path in an argument, is not this workspace's monitor. Multiple
|
||||
matches are returned in full: the legacy helper echoed every line and
|
||||
|
||||
Reference in new issue
Block a user