|
Replace the check-then-write singleton guard in run_loop with an atomic
noclobber PID-file claim. The old guard read the PID file then wrote it
in two steps; two starts racing (e.g. a fast double-login) could both
read a stale PID and spawn duplicate daemons. With noclobber only the
first writer creates the file; the loser aborts, and a stale PID from a
previous session is taken over rather than duplicated.
Also document install (~/bin copy) and autostart in CLAUDE.md.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|