Skip to content

Avoid systemd launched applications from closing forked children

David Edmundson requested to merge work/systemd_cleanup into master

We have a slight problem in the following set of circumstances; ProcessA is launched ProcessA forks ProcessA quits

This happens either with applications either detaching on launch (like TorBrowser in the linked bug) or kdevelop to open a new session with the process only quitting when the first window is closed.

One behavioural difference of services vs scopes is that the service will be deemed to have stopped when the first process quits. Systemd then cleans everything up including our newly spawned process.

By changing the killMode we prevent other processes being killed. The cgroup still remains until all processes exit.

This change was recommended by upstream developers to make sure we have no behavioural changes.

BUG: 425201

Merge request reports