moving file descriptor passing into a header

Colin Walters walters at verbum.org
Wed Apr 14 11:28:14 PDT 2010


On Tue, Apr 13, 2010 at 7:12 PM, Lennart Poettering <mzqohf at 0pointer.de> wrote:
>
> And then, this breaks in *any* case when fds are involved. Regardless if
> you demarshal/marshal to/from fds or fd indexes. Because after all the
> marshalled blob is exactly the same. The distinction is purely in the
> API for it.

True, as things are currently, dbus_message_marshal would copy the
header field.  However, if someone did "content marshalling" as Thiago
posted, they would no longer be copying the fds, which I would pretty
strongly is almost always what's desired for that case.

For example something like:
http://alban.apinc.org/blog/2010/04/01/d-bus-debugging-how-to-use-d-feet-on-n900/
Definitely does not want to try to copy file descriptors, because it's
clearly going to fail over TCP =)

We may want to add an explicit dbus_message_clone or something which
just copies content, interface, and path.  But not serial, destination
or any of the other headers (i.e. definitely not file descriptors).


More information about the dbus mailing list