Skip to content

fix(daemon): add ExitTimeOut to launchd plists to prevent SIGKILL during shutdown#150

Open
AprilNEA wants to merge 1 commit intomasterfrom
fix/launchd-exit-timeout
Open

fix(daemon): add ExitTimeOut to launchd plists to prevent SIGKILL during shutdown#150
AprilNEA wants to merge 1 commit intomasterfrom
fix/launchd-exit-timeout

Conversation

@AprilNEA
Copy link
Copy Markdown
Member

Summary

  • Add ExitTimeOut of 45 seconds to both launchd plist files
  • Prevents launchd from SIGKILL-ing the daemon during graceful shutdown (default 20s timeout is too short for 5s gRPC drain + 30s VM stop)

Test plan

  • Verify arcbox daemon stop completes gracefully without SIGKILL
  • Verify macOS system restart doesn't leave stale sockets

Closes ABX-237

Copilot AI review requested due to automatic review settings March 31, 2026 12:23
@linear
Copy link
Copy Markdown

linear bot commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates ArcBox’s macOS launchd configuration to allow more time for graceful shutdown, preventing launchd from SIGKILL-ing the daemon mid-stop (notably after gRPC drain + VM shutdown).

Changes:

  • Add ExitTimeOut = 45 to the dev LaunchAgent plist for dev.arcbox.daemon.
  • Add ExitTimeOut = 45 to the desktop helper’s launchd plist.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
scripts/dev.arcbox.daemon.plist Adds ExitTimeOut with inline rationale to avoid SIGKILL during longer graceful shutdown.
bundle/com.arcboxlabs.desktop.helper.plist Adds ExitTimeOut to align helper shutdown behavior with the daemon timeout.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a7b4a8f6e4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +78 to +79
<key>ExitTimeOut</key>
<integer>45</integer>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add ExitTimeOut to the production daemon plist

This change sets ExitTimeOut only in the dev helper plist (scripts/dev.arcbox.daemon.plist), but the actual user-installed daemon plist is generated in app/arcbox-cli/src/commands/install.rs (register_daemon_service) and currently contains no ExitTimeOut key, so launchd still uses its default timeout for com.arcboxlabs.desktop.daemon in normal installs. In production/uninstall/restart flows this means the daemon can still be SIGKILLed mid-shutdown, so the stated fix does not take effect for the main path.

Useful? React with 👍 / 👎.

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.

2 participants