Bug#989317: systemd kill background processes after user logs out (#825394 regression)

Ansgar ansgar at 43-1.org
Tue Jun 1 12:15:39 BST 2021


On Mon, 2021-05-31 at 20:37 -0400, Matt Corallo wrote:
> [1] eg systemd-run --user -p "Delegate=yes" --unit=fuzzer -- lxc-
> start --name fuzzer -- /usr/sbin/sshd -D

I think this is treated like a user .service unit.

So what happen should be: user logs out and no processes are left as
part of the login session[*].  As a result the `systemd --user` session
is shut down.  This causes all user units to be shut down, including
the process started by systemd-run.

To keep user units running, you would need to have the `systemd --user`
instance never shut down after logout which I don't think is the best
default behavior.  Or some way to switch this on-demand.  This is half
of what `loginctl enable-linger` does (but that setting also always
starts the `systemd --user` instance for the given users which is not
needed here).

Ansgar

  [*]: These processes are what "KillUserProcesses" are about AFAIU.



More information about the Pkg-systemd-maintainers mailing list