Skip to content

Stop exact descendants during pty kill - #166

Merged
myobie merged 1 commit into
mainfrom
agent/kill-releases-socket
Aug 26, 2026
Merged

Stop exact descendants during pty kill#166
myobie merged 1 commit into
mainfrom
agent/kill-releases-socket

Conversation

@myobie

@myobie myobie commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

A background descendant that currently survives pty kill will now stop.

Summary

  • Snapshot the exact descendant tree before the PTY child exits.
  • Bind each PID to its process-start identity before each signal.
  • Send exact TERM signals, then exact KILL signals after a bounded wait.
  • Return a nonzero error if the daemon remains alive after seven seconds.
  • Add the installed pty-kill-releases-socket-test command.

The shutdown never signals a process group.

Proof

  • The current Darwin CLI failed the command and left the socket owner alive.
  • The fixed Darwin CLI passed the kill-then-start cycle.
  • The current Linux CLI failed the command and left the socket owner alive.
  • The fixed Linux CLI passed the kill-then-start cycle under its subreaper.
  • Focused tests passed 24 of 24 tests.
  • The full local suite passed 1,615 tests. Two existing Nano tests failed because the host terminfo entry is incomplete.
  • The build, type check, and documentation verification passed.

Nathan remains the merge gate.

@myobie
myobie marked this pull request as ready for review August 25, 2026 19:35
@myobie
myobie merged commit 500eab2 into main Aug 26, 2026
2 checks passed
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