[systemd-devel] [PATCH] unit: Set KillMode=mixed for services which use sulogin

Michael Biebl mbiebl at gmail.com
Wed May 13 07:18:41 PDT 2015

2015-05-13 15:45 GMT+02:00 Lennart Poettering <lennart at poettering.net>:
> Well, I am pretty sure that in this case, it should be sulogin that
> propagates the shutdown request to the shell it spawned, but we should
> not do it otherwise.
> Note that by default we don't even clean up processes of unprivileged
> users on logout. You have to turn this on via KillUserProcesses=
> explicitly. And if we don't do this for unprivileged users, we
> certainly shouldn't do it for debug shells either....

Well, it's not the debug shell, it's emergency/rescue mode.
You typically end up there, because you have a fatal (config) error.
You then fix the problem and exit the shell to boot into the regular mode.
I don't see the point of letting stuff from emergency/rescue mode
continue to run after you've stopped it.

>> [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=784238
> That bug reports is long... From what I got this really looks like
> something to fix in Debian's sulogin implementation really.

You are correct. This turned out to be a bug in Debian's sulogin
implementation (which is currently provided by sysvinit-utils). I
filed bugs to have util-linux provide sulogin [1], since I wasn't able
to reproduce the problem with that implementation.

Still, while handling this bug report, I couldn't think of a good
reason to not use KillMode=mixed for emergency/rescue mode, that's why
I proposed this patch.

I see that you don't like it, so I'll probably just ship it downstream
for now. And drop it eventually, once we have u-l's sulogin as

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=784566#77
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

More information about the systemd-devel mailing list