[RFC] Patch to allow a DBusConnection to be recreated from an fd

Thiago Macieira thiago at kde.org
Tue Mar 5 11:26:49 PST 2013


On terça-feira, 5 de março de 2013 16.10.38, Simon McVittie wrote:
> I'm sure there are more bits of state like this, and I doubt the
> necessary complexity in libdbus to support serializing and deserializing
> the entire DBusConnection state is something I'd be prepared to merge.

I agree with all of the concerns voiced so far in terms of re-exec'ing the 
daemon.

That said, the two new functions are acceptable in principle (I haven't 
checked the implementation). I don't see any harm in obtaining the connection 
address, and I do think that creating a connection from an already-opened file 
descriptor could be very useful. For example, some pre-handshake could be 
performed on that file descriptor, or it could be transported over something 
different. It's a simpler way than writing a new DBusTransport.

The APIs themselves might need work. For example, it needs "unix" to make 
"unix_fd" and the get_address function needs to be clear *which* endpoint's 
address it is returning: local (getsockname) or remote (getpeername).

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20130305/9f67b1ca/attachment.pgp>


More information about the dbus mailing list