Skip to content

macOS: keep command-line launches alive in cmux - #23

Merged
tobi merged 1 commit into
tobi:mainfrom
ashwch:fix/cmux-terminal-launch
Sep 27, 2026
Merged

tobi merged 1 commit into
tobi:mainfrom
ashwch:fix/cmux-terminal-launch

Conversation

@ashwch

@ashwch ashwch commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • restart interactive macOS launches from cmux in a separate process group before AppKit takes focus
  • preserve the original arguments and use an environment marker to prevent recursive restarts
  • leave non-cmux and non-interactive launches unchanged

Why

On macOS, make install exposes the app through a command-line symlink. When that command opens its AppKit window inside cmux, cmux sends SIGTERM to the terminal's foreground process group and zsh reports:

zsh: terminated  disktree --disk

Starting the app once in a new process group keeps it outside the group cmux terminates.

Testing

  • make ci
  • reproduced the termination with the v0.10.0 command-line symlink
  • built the patched release and launched disktree --disk in a fresh cmux workspace
  • verified the app was reparented into its own process group, completed the disk scan, and remained running

cmux terminates the foreground process group when AppKit activates an executable reached through the macOS command-line symlink.

Restart interactive cmux launches once in their own process group before AppKit starts. Preserve arguments, prevent recursive restarts with an environment marker, and leave non-cmux and non-interactive launches unchanged.
Copilot AI lite review requested due to automatic review settings September 25, 2026 20:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

3 participants