Unix FD Passing
Lennart Poettering
mzqohf at 0pointer.de
Wed May 20 14:48:44 PDT 2009
On Wed, 20.05.09 16:55, Havoc Pennington (hp at pobox.com) wrote:
>
> Hi,
>
> On Wed, May 20, 2009 at 4:39 PM, Lennart Poettering <mzqohf at 0pointer.de> wrote:
> > I am not sure I fully understood your question, but I think generic
> > demarshalling code like that wouldn't make sense anyway. Because in
> > contrast to other fixed data types unix fds are special: you need to
> > close() them after use.
>
> Hmm, I think such code does exist now though (I think the Qt
> bindings do it?)
If Qt does it is broken I'd say.
Generally, software shouldn't try to demarshal stuff it doesn't
understand. And "half-understanding" is still "not understanding". ;-)
> I'm wondering a bit if the user of libdbus should have to enable
> feature extensions ... that would get pretty gross in the long term.
> But the problem is that if libdbus supports fds, but the binding
> doesn't, then in effect we don't support fds - but we're advertising
> that we do.
>
> We need to at least document that get_fixed_array will fail on fd arrays.
I have added a bunch of comments explaining this now.
Lennart
--
Lennart Poettering Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/ GnuPG 0x1A015CC4
More information about the dbus
mailing list