diff --git a/package-lock.json b/package-lock.json index 6b4b766..4e45214 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "folio", - "version": "0.1.17", + "version": "0.1.15", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "folio", - "version": "0.1.17", + "version": "0.1.15", "license": "MIT", "dependencies": { "@tiptap/core": "^2.27.2", diff --git a/package.json b/package.json index 3ffd369..85cbb3f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "folio", - "version": "0.1.17", + "version": "0.1.15", "description": "A simple, local, open-source desktop writing app.", "productName": "Folio", "author": "Folio Contributors", diff --git a/src/main/index.ts b/src/main/index.ts index c9557a1..3596ddb 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -1354,11 +1354,6 @@ handleIpc("folio:performUpdate", async () => { execFileSync("systemd-run", [ "--user", "--quiet", "--collect", `--description=Folio updater handoff`, - // Default KillMode=control-group means the unit's cgroup is swept - // when the script exits — that killed the backgrounded relaunch - // before Electron got to start (v0.1.15 update: swap OK, app died). - // KillMode=process lets the script exit while its child app lives. - "--property=KillMode=process", "/bin/sh", script, ], { timeout: 10_000, stdio: "ignore" }); handedOff = true; diff --git a/src/main/update.ts b/src/main/update.ts index 9493643..738245b 100644 --- a/src/main/update.ts +++ b/src/main/update.ts @@ -224,14 +224,7 @@ export function buildInstallerScript(spec: InstallerSpec): string { ' rm -rf "$NEW"', "fi", 'say "relaunching"', - // Detach fully: setsid moves the relaunch into its own session so it - // survives this script's exit and any cgroup sweep of the transient - // unit (systemd KillMode). Fallback chain for missing setsid. - 'if command -v setsid >/dev/null 2>&1; then', - ' setsid "$RELAUNCH" >/dev/null 2>&1 < /dev/null &', - 'else', - ' nohup "$RELAUNCH" >/dev/null 2>&1 < /dev/null &', - "fi", + '"$RELAUNCH" >/dev/null 2>&1 &', "", ].join("\n"); }