[systemd-devel] Perl Net::DBus, org.freedesktop.system1 and inhibitor locks
Mantas Mikulėnas
grawity at gmail.com
Wed May 25 20:40:16 UTC 2016
In other words, mixing up OS file descriptors and Perl file handles?
D-Bus can only send and receive raw FDs; Net::DBus doesn't know what kind
of handle it's supposed to be, so you need to either create one manually,
or just work with the FD directly (I think the relevant function is
sysclose()?...)
On Wed, May 25, 2016, 22:57 Michael Hirmke <mh at mike.franken.de> wrote:
> Hi again,
>
> [...]
> >>> - I am not able to close the file descriptor in the pre block of the
> >>> signal handler. Whenever I try, I get an error, that the descriptor
> >>> is closed.
>
> >>This suggests something else closed the fd for you?
>
> >Yes, but who or what might that be?
> >As I wrote above - at the moment I'm the only one using the system and I
> >have no idea, what component might fiddle with my file descriptors.
> >Do you have any hint, how I could find that out / debug it?
>
> >And there is the fact, that the lock is still in the list of inhibitors.
> >As far as I understand the docs, the entry should be gone when the fd is
> >closed.
>
> forget about that question - I have never asked it 8-((
>
> It was a really stupid error in my perl code - the file descriptor was
> never open. I got a file handle, but didn't realize that I have to open
> it myself. Now it works as expected.
>
> >>Lennart
>
>
> Bye.
> Michael.
> --
> Michael Hirmke
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20160525/0368e98b/attachment-0001.html>
More information about the systemd-devel
mailing list