Skip to content

PyAutoPulse v1.3 — stop --all (recover orphan daemon) - #3

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/pulse-v1.3-stop-all
Jun 1, 2026
Merged

PyAutoPulse v1.3 — stop --all (recover orphan daemon)#3
Jammy2211 merged 1 commit into
mainfrom
feature/pulse-v1.3-stop-all

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Fixes the stop robustness gap noted in v1.2 and hit live during first-run
testing: pyauto-pulse stop works only via the pidfile, so a daemon whose
pidfile was lost couldn't be stopped — stop reported "not running" while the
process lived on, and a later live/watch would be refused or spawn a
duplicate.

Change

  • stop --all — pgrep-based sweep (matched on the pulse/daemon.sh script
    path) that TERMs every pulse daemon, escalates to KILL for stragglers, and
    clears the pidfile, regardless of pidfile state.
  • Plain stop with no pidfile now points the user at --all.

Verification

  • Orphan + no pidfile: plain stop → "not running" + hint; stop --all
    "swept 1 daemon process(es)", 1 → 0.
  • Normal (pidfile present): stop --all stops + sweeps cleanly, pidfile gone.
  • Nothing running: both forms idempotent.
  • 73 tests still pass.

Enables a clean PyAutoPulse tab-launcher alias (bashrc, not in this repo)
that uses stop --all instead of a manual pkill workaround.

`pyauto-pulse stop` only ever worked via the pidfile, so a daemon whose
pidfile was deleted out from under it could not be stopped — `stop` reported
"not running" while the process lived on, and a subsequent `live`/`watch`
would either be refused or spawn a duplicate.

Add `stop --all`: a pgrep-based sweep (matched on the daemon.sh script path)
that TERMs every pulse daemon process, escalates to KILL for stragglers, and
clears the pidfile — regardless of pidfile state. Plain `stop` now also points
the user at `--all` when it finds no pidfile.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant