Created attachment 30315 [details] [review] 0001-Trivial-whitespace-fixup.patch Here is a patch series that implements a more versatile shutdown api as outlined on the gdm mailing list a while ago.
Created attachment 30316 [details] [review] 0002-Allow-org.freedesktop.DBus.Properties-calls.patch
Created attachment 30317 [details] [review] 0003-Unify-the-restart-and-stop-code-paths.patch
Created attachment 30318 [details] [review] 0004-Document-the-CanRestart-and-CanStop-methods.patch
Created attachment 30319 [details] [review] 0005-Add-a-Stopping-property.patch
Created attachment 30320 [details] [review] 0006-Introduce-need_elevated_privileges.patch
Created attachment 30321 [details] [review] 0007-Make-xsl-transformation-more-forgiving.patch
Created attachment 30322 [details] [review] 0008-Introduce-Inhibitors.patch
Created attachment 30323 [details] [review] 0009-Add-a-hash-table-for-inhibitors.patch
Created attachment 30324 [details] [review] 0011-Add-initial-inhibit-api.patch
Created attachment 30325 [details] [review] 0010-Add-cookie-generation.patch
Created attachment 30326 [details] [review] 0012-Require-elevated-privileges-when-inhibitors-are-set.patch
Created attachment 30327 [details] [review] 0013-Add-more-inhibit-api.patch
Created attachment 30328 [details] [review] 0014-Add-inhibitor-related-signals.patch
Created attachment 30329 [details] [review] 0015-Remove-inhibitors-automatically.patch
Created attachment 30330 [details] [review] 0016-Add-session-api-for-graceful-shutdown.patch
Created attachment 30331 [details] [review] 0017-Refactor-get_polkit_permissions.patch
Created attachment 30332 [details] [review] 0018-Introduce-QueryStop-and-CancelStop.patch
Created attachment 30333 [details] [review] 0019-Add-a-timeout-for-QueryStop-responses.patch
Created attachment 30334 [details] [review] 0020-Make-Stop-Restart-stop-all-sessions.patch
Created attachment 30335 [details] [review] 0021-Add-docs.patch
Created attachment 33102 [details] [review] 0001-Trivial-whitespace-fixup.patch
Created attachment 33103 [details] [review] 0002-Allow-org.freedesktop.DBus.Properties-calls.patch
Created attachment 33104 [details] [review] 0003-Unify-the-restart-and-stop-code-paths.patch
Created attachment 33105 [details] [review] 0004-Document-the-CanRestart-and-CanStop-methods.patch
Created attachment 33106 [details] [review] 0005-Add-a-Stopping-property.patch
Created attachment 33107 [details] [review] 0006-Introduce-need_elevated_privileges.patch
Created attachment 33108 [details] [review] 0007-Make-xsl-transformation-more-forgiving.patch
Created attachment 33109 [details] [review] 0008-Introduce-Inhibitors.patch
Created attachment 33110 [details] [review] 0009-Add-a-hash-table-for-inhibitors.patch
Created attachment 33111 [details] [review] 0010-Add-cookie-generation.patch
Created attachment 33112 [details] [review] 0011-Add-initial-inhibit-api.patch
Created attachment 33113 [details] [review] 0012-Require-elevated-privileges-when-inhibitors-are-set.patch
Created attachment 33114 [details] [review] 0013-Add-more-inhibit-api.patch
Created attachment 33115 [details] [review] 0014-Add-inhibitor-related-signals.patch
Created attachment 33116 [details] [review] 0015-Remove-inhibitors-automatically.patch
Created attachment 33117 [details] [review] 0016-Add-session-api-for-graceful-shutdown.patch
Created attachment 33118 [details] [review] 0017-Refactor-get_polkit_permissions.patch
Created attachment 33119 [details] [review] 0018-Introduce-QueryStop-and-CancelStop.patch
Created attachment 33120 [details] [review] 0019-Add-a-timeout-for-QueryStop-responses.patch
Created attachment 33121 [details] [review] 0020-Make-Stop-Restart-stop-all-sessions.patch
Created attachment 33122 [details] [review] 0021-Add-docs.patch
Created attachment 33123 [details] [review] 0022-Misc-fixes.patch
Patches rebased to current master, and some fixes added.
Created attachment 33143 [details] [review] Fixes to the handling of jit inhibitors
Created attachment 33152 [details] [review] Don't forget to emit Session::CancelStop
systemd now provides an inhibit api for shutdown and suspend that largely covers what I was hoping to achieve here.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.