Main: Properly quit old process when relaunching from AppImage format

This commit is contained in:
PrestonN 2021-11-11 20:35:20 -05:00
parent 237ff2f309
commit 3b8213b8cf
1 changed files with 2 additions and 1 deletions

View File

@ -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()