Skip to content

fix(gateway): exit non-zero on macOS launchd restart path (#43475)#43596

Open
kyssta-exe wants to merge 1 commit into
NousResearch:mainfrom
kyssta-exe:auto-fix/issue-43475
Open

fix(gateway): exit non-zero on macOS launchd restart path (#43475)#43596
kyssta-exe wants to merge 1 commit into
NousResearch:mainfrom
kyssta-exe:auto-fix/issue-43475

Conversation

@kyssta-exe

Copy link
Copy Markdown
Contributor

Fixes #43475. On macOS, /restart used the detached path (via_service=False) which skipped setting the exit code. launchd's KeepAlive.SuccessfulExit=false requires a non-zero exit to relaunch the process. Added an elif branch to set exit code 75 on macOS when via_service is False.

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/gateway Gateway runner, session dispatch, delivery labels Jun 10, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Related: #43498 (competing fix for the same issue #43475). Both make the gateway exit non-zero so launchd's KeepAlive.SuccessfulExit=false revives it, but via different mechanisms: this PR adds a macOS-only elif sys.platform == "darwin" branch (exit 75) in the drain path, while #43498 adds a cross-platform fallthrough in start_gateway() returning False (exit 1). Maintainer to pick the mechanism.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/restart bricks a launchd-managed gateway on macOS — exits 0, KeepAlive.SuccessfulExit=false won't revive it

2 participants