df75a1a8aa5420335a56093077fa8cfcbfffac78
There is no justification not to wait an extra (default) 5 seconds, for a more graceful shutdown of user programs. Again, you don't get to ignore delay inhibitors for unscheduled shutdowns, short of `systemctl poweroff -f`. It is simplest if we move the test for `m->shutdown_dry_run` into manager_scheduled_shutdown_handler(). However we need to not add such delays during a "dry run". Otherwise, we would still have to be considered "in progress" for some seconds after our admin has seen the final wall message. If they go to `poweroff`, we would have blocked them with a misleading error message. Note this `poweroff` will still process delay inhibitors as needed. If the admin planned to use a more forceful method... eh. It's their responsibility to assess whether that's safe. There is an argument that the alternative behaviour could be used (racily!) to kludge around them not being able to shutdown to "single user mode". If we cared about that case, we would have easily preserved non-racy support for it in `shutdown`. Additionally, though I think this code does read more easily by reducing inconsistencies, we didn't come up with any use case for delay inhibitors v.s. shutdown.[1] The SIGTERM v.s. SIGKILL delay is more general, and we allow a whole 90 seconds for it, not just 5. So I don't think keeping this approach bears a risk of significant damage. [1] https://www.freedesktop.org/wiki/Software/systemd/inhibit/
systemd - System and Service Manager
Details
General information about systemd can be found in the systemd Wiki.
Information about build requirements are provided in the README file.
Consult our NEWS file for information about what's new in the most recent systemd versions.
Please see the HACKING file for information how to hack on systemd and test your modifications.
Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.
When preparing patches for systemd, please follow our Coding Style Guidelines.
If you are looking for support, please contact our mailing list or join our IRC channel.
Languages
C
88.5%
Shell
5.7%
Python
4.6%
Meson
1.1%