* Fix orphaned child processes when closing workspace tabs When closing a workspace tab via the sidebar X button, child processes (login → zsh → claude) survived as orphans because TabManager.closeWorkspace() only removed the workspace from the tabs array without explicitly freeing Ghostty surfaces. It relied on ARC to cascade deallocation, but SwiftUI views and Combine publishers held references, delaying or preventing ghostty_surface_free() (which sends SIGHUP) from ever running. This adds explicit teardown on the workspace close path: - TerminalSurface.teardownSurface(): idempotent method to free the Ghostty runtime surface eagerly, matching the existing deinit logic - TerminalPanel.close() now calls teardownSurface() to ensure SIGHUP is sent - Workspace.teardownAllPanels() iterates all panels and closes them - TabManager.closeWorkspace() calls teardownAllPanels() before removing the workspace from the tabs array * Harden workspace teardown and ownership checks * Address follow-up teardown review feedback --------- Co-authored-by: Lawrence Chen <54008264+lawrencecchen@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| AppDelegateShortcutRoutingTests.swift | ||
| BrowserFindJavaScriptTests.swift | ||
| CJKIMEInputTests.swift | ||
| CmuxWebViewKeyEquivalentTests.swift | ||
| GhosttyConfigTests.swift | ||
| SessionPersistenceTests.swift | ||
| SocketControlPasswordStoreTests.swift | ||
| UpdatePillReleaseVisibilityTests.swift | ||
| WorkspaceContentViewVisibilityTests.swift | ||
| WorkspaceManualUnreadTests.swift | ||