Skip to content

Dev/1.0.11 - #13

Merged
fbnlrz merged 2 commits into
mainfrom
dev/1.0.11
Jul 27, 2026
Merged

Dev/1.0.11#13
fbnlrz merged 2 commits into
mainfrom
dev/1.0.11

Conversation

@fbnlrz

@fbnlrz fbnlrz commented Jul 27, 2026

Copy link
Copy Markdown
Owner

fix start after update

fbnlrz added 2 commits July 27, 2026 21:52
After an in-app update Inari quit and stayed down whenever it was running
from the autostart unit. Two things had to go wrong together:

  - restart_app spawns "setsid sh -c 'sleep 2; exec /usr/bin/inari'" and
    exits. setsid gets a new session but stays in the service's cgroup,
    and KillMode defaults to control-group, so systemd sweeps the helper
    up the moment the main process exits - during its sleep, before it
    ever reaches the exec.
  - The unit has Restart=on-failure, and quitting in order to restart is
    a clean exit, so systemd did not step in either. Restart=always would
    be wrong: it would make quitting from the tray impossible.

Reproduced both: a service running the same setsid pattern leaves no
trace of its helper, and the journal for the 1.0.9 -> 1.0.10 upgrade
shows the unit exiting with status=0 one second after dpkg and never
coming back.

When we are the unit, ask systemd to restart it and let the job outlive
us. --no-block matters: the first half of that job is stopping this very
process, so a blocking call would wait on our own death.

Detection deliberately does not use INVOCATION_ID. systemd sets it for
every unit, and KDE wraps a manual launch in a transient
app-<name>@<hash>.service - restarting inari.service from inside one of
those would start a unit the user never asked for and orphan the
launched instance. The cgroup path names the unit we are actually in.
Verified against both real cgroups from this machine.

Off systemd - AppImage, a direct launch - the existing relauncher is
still the right answer and is untouched.
@fbnlrz
fbnlrz merged commit a789308 into main Jul 27, 2026
6 checks passed
@fbnlrz
fbnlrz deleted the dev/1.0.11 branch July 27, 2026 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant