Skip to content
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

Support for passing and receiving Unix file descriptors #86

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

molobrakos
Copy link

@molobrakos molobrakos commented Mar 25, 2019

Closes
#42, #54

(Maybe of interest to anyone: the branch https://github.com/molobrakos/pydbus/tree/master%2Basync%2Bunixfd contains support for both unix file descriptors as well as the support for asynchronous calls by @poncova in (poncovka@5e2b4d2 - merging these two were a little bit messy since they are touching the same code)

Semantics for file descriptor ownership should probably be described in the documentation. Any file descriptor as out parameter will be closed by the dbus interface and should not be closed by the sender (just passed as return). Any file desciptor as in-parameter is only valid for the duration of the call and will be closed by the dbus interface. If the receiver wants to keep it, it should be duplicated using os.dup.

@molobrakos molobrakos force-pushed the unixfd branch 4 times, most recently from e95ea9d to 41bb280 Compare March 28, 2019 22:24
@phillebaba
Copy link

Any possibility for this to be merged and included into a new release @LEW21?

@ppareit
Copy link

ppareit commented May 26, 2020

pydbus is a nice library, unfortunately I'm unable to use it. I need to call some dbus function that returns a file discriptor. This patch could fix this! Hope you look into this @LEW21 ?

@mpflanzer
Copy link

Is there anything which prevents this from being merged? Would be really nice to have this in a release.

@poncovka
Copy link

Is there anything which prevents this from being merged? Would be really nice to have this in a release.

Hi! Our team stopped using pydbus some time ago due to some issues and missing features and wrote the dasbus library. Recently, we have added support for Unix file descriptors (https://dasbus.readthedocs.io/en/latest/examples.html#support-for-unix-file-descriptors). It might help you with your use case as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants