Skip to content

Add --exit-with-parent watchdog#2

Merged
dsward2 merged 1 commit into
mainfrom
exit-with-parent-watchdog
Jun 29, 2026
Merged

Add --exit-with-parent watchdog#2
dsward2 merged 1 commit into
mainfrom
exit-with-parent-watchdog

Conversation

@dsward2

@dsward2 dsward2 commented Jun 29, 2026

Copy link
Copy Markdown
Owner

Adds an opt-in CLI flag that makes the server exit when its parent process dies — even on a crash/SIGKILL where the parent can't run its own cleanup. A host app that launches LiveAudioServer as a helper can pass --exit-with-parent to guarantee the server is reaped rather than orphaned holding its HTTP port.

Implementation: ServerConfig.exitWithParent (parsed in CLIParse) gates a DispatchSource timer in the CLI that polls getppid(); when the process is reparented (to launchd, pid 1) it runs the existing graceful shutdown. Library behavior is unchanged when the flag is absent.

Adds an opt-in CLI flag that makes the server exit when its parent
process dies — even on a crash/SIGKILL where the parent can't run its
own cleanup. A host app that launches LiveAudioServer as a helper can
pass --exit-with-parent to guarantee the server is reaped rather than
orphaned holding its HTTP port.

Implementation: ServerConfig.exitWithParent (parsed in CLIParse) gates a
DispatchSource timer in the CLI that polls getppid(); when the process
is reparented (to launchd, pid 1) it runs the existing graceful
shutdown. Library behavior is unchanged when the flag is absent.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dsward2 dsward2 merged commit acce5a5 into main Jun 29, 2026
0 of 2 checks passed
@dsward2 dsward2 deleted the exit-with-parent-watchdog branch June 29, 2026 11:13
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