From 3b8213b8cf009114801a3b679c86a69a2f840ac9 Mon Sep 17 00:00:00 2001 From: PrestonN Date: Thu, 11 Nov 2021 20:35:20 -0500 Subject: [PATCH] Main: Properly quit old process when relaunching from AppImage format --- src/main/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/index.js b/src/main/index.js index 849f12c5..b00d5e36 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -339,7 +339,8 @@ function runApp() { // If it's an AppImage, things must be done the "hard way" // `app.relaunch` doesn't work because of FUSE limitations // Spawn a new process using the APPIMAGE env variable - cp.spawn(APPIMAGE, { detached: true, stdio: 'ignore' }) + const subprocess = cp.spawn(APPIMAGE, { detached: true, stdio: 'ignore' }) + subprocess.unref() } app.quit()