How to Listen for SessionRemoved Signal

Kurt von Laven kurt at endlessm.com
Thu Jul 10 12:34:08 PDT 2014


Hello folks,

I am attempting to listen to the SessionRemoved signal from the login
manager <http://www.freedesktop.org/wiki/Software/systemd/logind/>. I have
no trouble in the case where the user logs out and waits for ~15 seconds
before shutting down, but when the user shuts down the system without first
logging out I don't hear the SessionRemoved signal in time. I would've
thought that inhibiting shutdown (by calling the Inhibit method of the
login manager <http://www.freedesktop.org/wiki/Software/systemd/inhibit/>)
would be the appropriate way to keep my process alive long enough to record
the SessionRemoved signal before my process gets killed. Apparently that is
not the case though. I am fairly certain that I am actually inhibiting
shutdown, because my process shows up when I call ListInhibitors in D-Feet
<https://wiki.gnome.org/action/show/Apps/DFeet>. (In case it's relevant,
I'm using the delay mode.) If anyone has any suggestions on how to debug
this or knows what I am missing here, that would be greatly appreciated.
Please let me know if I should be including additional details here;
apologies in advance as this is my first time posting on this mailing list.

Be well,
Kurt

--
Kurt von Laven | Endless Mobile | EndlessM.com <http://endlessm.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20140710/362e39da/attachment.html>


More information about the dbus mailing list