[systemd-devel] systemd-inhibit --what=handle-power-key broken with systemd 198
Manuel Reimer
Manuel.Spam at nurfuerspam.de
Wed Mar 27 15:17:04 PDT 2013
Just one more information: It seems like the inhibitors work if I'm on the same
shell/virtual terminal where the inhibitor was created.
So the inhibitors, created by KDE, only work if I'm on the KDE screen. If I
switch to another VT, then the power button forcefully shuts down the system.
Seems like I'm seeing the same effect with my code, but as I want to use an
inhibitor in a daemon that gets started by systemd while the system boots, this
doesn't make much sense for me.
Manuel Reimer wrote:
> Hello,
>
> I'm using ArchLinux which currently uses systemd 198.
>
> I try to inhibit the power key to get sure systemd doesn't shut down if it is
> pressed. My testcase is as follows:
>
> # systemd-inhibit --what=handle-power-key --mode=block sleep 1000000
>
> Now I switch to another shell to check if the inhibitor is listed:
>
> # systemd-inhibit --list
> Who: sleep 1000000 (UID 0, PID 222)
> What: handle-power-key
> Why: Unknown reason
> Mode: block
>
> 1 inhibitors listed.
>
> After doing so and getting sure the inhibitor really is listed, I hit the power
> key and... the system is shutting down...
>
> For me it seems like something caused this whole thing to get broken. Can
> someone reproduce or is this only broken on ArchLinux?
>
> Yours
>
> Manuel Reimer
More information about the systemd-devel
mailing list