[systemd-devel] Can't Inhibit shutdown with logind
Andrey Borzenkov
arvidjaar at gmail.com
Sat Jun 1 22:00:57 PDT 2013
В Tue, 28 May 2013 01:28:48 +0100
Brendan J <bhenryj0117 at googlemail.com> пишет:
> Hi all,
>
> I'm trying to use the Inhibit() API exposed by logind on dbus
> (org.freedesktop.login1.Manager) to prevent shutdown.
> The call seems superficially to have worked, as the result from
> ListInhibitors() includes the block I created. However my machine is not
> prevented from shutting down.
>
How exactly do you initiate shutdown? Which command, which user?
> I'm pretty stumped on how to proceed with debugging this, beyond checking
> what signals get sent (my program receives PrepareForShutdown(true)).
> Could anyone suggest anything?
>
> Code: http://pastebin.com/h0cWwz1m
>
> Many thanks,
> Brendan
>
> (p.s. some relevant reference links to save clicking:
> http://www.freedesktop.org/wiki/Software/systemd/inhibit/
> http://www.freedesktop.org/wiki/Software/systemd/logind/
> )
More information about the systemd-devel
mailing list