fix(desktop): shut down cleanly with workspace terminals (#3268)
Workspace terminal shutdown only signaled an npm wrapper, leaving Electron alive with broken output pipes. Make the signal-handling runner the terminal-owned process and route external Electron termination through the existing quit lifecycle.
This commit is contained in:
@@ -83,6 +83,7 @@ import {
|
||||
} from "./daemon/daemon-manager.js";
|
||||
import {
|
||||
createQuitLifecycle,
|
||||
registerExternalQuitSignals,
|
||||
stopDesktopManagedDaemonOnQuitIfNeeded,
|
||||
} from "./daemon/quit-lifecycle.js";
|
||||
import { runDesktopStartup } from "./desktop-startup.js";
|
||||
@@ -1081,6 +1082,7 @@ const quitLifecycle = createQuitLifecycle({
|
||||
// electron-updater forwards this event through Electron's built-in autoUpdater.
|
||||
electronAutoUpdater.on("before-quit-for-update", quitLifecycle.handleBeforeQuitForUpdate);
|
||||
app.on("before-quit", quitLifecycle.handleBeforeQuit);
|
||||
registerExternalQuitSignals({ signals: process, quit: () => app.quit() });
|
||||
|
||||
app.on("window-all-closed", () => {
|
||||
if (process.platform !== "darwin") {
|
||||
|
||||
Reference in New Issue
Block a user