Compare commits
2 commits
328b24d5a6
...
6c8b82940a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c8b82940a | ||
|
|
aebfa26308 |
4 changed files with 16 additions and 4 deletions
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "folio",
|
"name": "folio",
|
||||||
"version": "0.1.15",
|
"version": "0.1.16",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "folio",
|
"name": "folio",
|
||||||
"version": "0.1.15",
|
"version": "0.1.16",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tiptap/core": "^2.27.2",
|
"@tiptap/core": "^2.27.2",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "folio",
|
"name": "folio",
|
||||||
"version": "0.1.15",
|
"version": "0.1.16",
|
||||||
"description": "A simple, local, open-source desktop writing app.",
|
"description": "A simple, local, open-source desktop writing app.",
|
||||||
"productName": "Folio",
|
"productName": "Folio",
|
||||||
"author": "Folio Contributors",
|
"author": "Folio Contributors",
|
||||||
|
|
|
||||||
|
|
@ -1354,6 +1354,11 @@ handleIpc("folio:performUpdate", async () => {
|
||||||
execFileSync("systemd-run", [
|
execFileSync("systemd-run", [
|
||||||
"--user", "--quiet", "--collect",
|
"--user", "--quiet", "--collect",
|
||||||
`--description=Folio updater handoff`,
|
`--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,
|
"/bin/sh", script,
|
||||||
], { timeout: 10_000, stdio: "ignore" });
|
], { timeout: 10_000, stdio: "ignore" });
|
||||||
handedOff = true;
|
handedOff = true;
|
||||||
|
|
|
||||||
|
|
@ -224,7 +224,14 @@ export function buildInstallerScript(spec: InstallerSpec): string {
|
||||||
' rm -rf "$NEW"',
|
' rm -rf "$NEW"',
|
||||||
"fi",
|
"fi",
|
||||||
'say "relaunching"',
|
'say "relaunching"',
|
||||||
'"$RELAUNCH" >/dev/null 2>&1 &',
|
// 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",
|
||||||
"",
|
"",
|
||||||
].join("\n");
|
].join("\n");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue