3 ms·
This is not a systemd issue per-se. Whatever process it’s trying to stop is taking its time. Systemd doesn’t explicitly know what to do and most likely falls ba
by Nextgrid 6y ago
This is not a systemd issue per-se. Whatever process it’s trying to stop is taking its time. Systemd doesn’t explicitly know what to do and most likely falls back to a reasonable compile-time default.
The other comments already explained how to change the timeout per-unit, but I wonder how would you want a “perfect” init system to handle this?
Hang forever until the process dies without any message (as far as I know this is how legacy shell-script-based inits would handle it)?
Kill the process immediately and risk data loss?
Behave as-is but with a lower default delay?
- dooglius 6y agoThe Windows behavior (prompt the user to kill anything manually) seems like the ideal behavior. Of course, this is tricky wrt dependency issues (e.g. if remote, you need to keep sshd and its dependencies alive in order to implemnent such a prompt), but hanging forever seems like a preferable fallback.
- kaba0 6y agoAnd that is the responsibility of the display manager (and it is sort of what happens under gnome). Systemd had as default KillUserProcesses (it may not be the exact name but it was something like that, I didn’t check it) set to true, and that caused many to hate on the whole project because I don’t know tmux and other apps that override the “normal” behavior on signals lost their sessions. So now it usually defaults to false, though I tend to override it to true. The thing is, “with enough users someone will depend on both the public and private parts of your APIs” is true (and I am sure I butchered up this quote as well)