Skip to content

fix(pi): remove the registry entry when the terminal hangs up - #155

Merged
backnotprop merged 2 commits into
mainfrom
fix/pi-entry-hangup
Nov 15, 2026
Merged

backnotprop merged 2 commits into
mainfrom
fix/pi-entry-hangup

Conversation

@backnotprop

Copy link
Copy Markdown
Contributor

When the terminal hangs up with SIGHUP ignored (nohup, a launcher that doesn't forward it), the hang-up watch exits with process::exit, which skips Drop. The Pi link's tui/<pid>.json entry was left behind. The watch now removes it before exiting.

A plain SIGHUP still ends the process before any cleanup can run. Pi and pi list already drop entries whose port refuses the connection, so a stale entry is only clutter.

Tested by hand: a document review in a private tmux with SIGHUP ignored, then the tmux server killed. Before this change the entry stayed; after it, the entry is gone. All 461 tests pass.

@backnotprop
backnotprop added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit f147c55 Nov 15, 2026
3 checks passed
@backnotprop
backnotprop deleted the fix/pi-entry-hangup branch November 15, 2026 17:48
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