systemd inhibit support for PowerDevil
Review Request #106533 - Created Sept. 22, 2012 and submitted
Implement "support" for systemd inhibit handling in PowerDevil Policy Agent. Basically it tells systemd that we want to handle things on ourselves (power/sleep/lid switch buttons). For details, see https://bugzilla.redhat.com/show_bug.cgi?id=859227 P.S. Not sure PolicyAgent is the right place but well... the code is simple and can be eventually moved elsewhere
|I wonder if some of those strings need i18n?||Dario Freddi|
From the docs: QDBusUnixFileDescriptor does not take ownership of the file descriptor. Instead, it will use the Unix system call dup(2) to make a copy of the file descriptor. This file descriptor belongs to the QDBusUnixFileDescriptor object and should not be stored or closed by the user. Instead, you should make your own copy if you need that. TBH, in your situation is pretty much unclear what's going to happen, since the FD is an actual argument. Have you tried seeing what happens without this specific call? If the docs don't lie, the FD should be closed nonetheless upon destruction.
I wonder if some of those strings need i18n?
One more thing: manual (man logind.conf) says that inhibiting lid close event is ignored by default, so it won't work as expected. This probably should be discussed with the systemd developers.
Another question: how does PowerDevil behave now, if the checkbox «handle button events» (in PowerDevil settings) is unchecked? Does it disable systemd button handling then or does it leave it as it was? I'm not sure which behaviour is correct in this case and why.