-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unix file descriptors not supported #42
Comments
I haven't written any code for fd passing yet, and looks like GDBus does not support them transparently, but requires using g_dbus_message_get_unix_fd_list - like in https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-unix-fd-client.c#n27 I guess it's necessary to modify https://github.com/LEW21/pydbus/blob/master/pydbus/proxy_method.py#L72 to use the GDBusMessage API for calling methods. |
While digging around I found the method I've made a nasty hack to test if this is right, and so far it seems to be successful. |
I did some more checks, and it appears it doesn't matter if you call The question now is how to solve this in the cleanest way. I would propose to use One issue I do still see is that |
I just wanted to add that I've seen issues with Unix file descriptors not being represented correctly in pydbus also. It has taken me a while to track this down and I wanted to share some of my findings in the hope that it helps. I have been rewriting the BlueZ test-profile script to use pydbus. Is there a simple work around that would allow me to get something working for test-profile with pydbus? Thanks in advance, |
Relevant: #54 (comment) |
When I try to inhibit the power key on org.freedesktop.login1, pydbus doesn't seem to return the file descriptor, nor does it give me an error.
Sample code:
Expected result is a valid file descriptor.
Actual result is 0.
This does work fine in python-dbus:
This is on python 3.6.0 with pydbus version 0.6.0
The text was updated successfully, but these errors were encountered: