dbus exit on disconnect and glib

Thiago Macieira thiago at kde.org
Thu Feb 21 23:54:40 PST 2008


Havoc Pennington wrote:
>>  Do you think this scenario is possible:
>>  A program uses two threads, two proxies and one connection.
>>  It sends messages without lock. The system bus receives mixed data,
>> this is invalid : only choice is disconnection.
>>  The client then exit.
>>  Could it be what happened?
>
>Yes, that is very much possible I think.

I don't think so. The message is entirely prepared in memory before 
sending, then it's sent with writev() in one go. It's atomic, so it 
cannot send mixed stuff.

So it's a different thread-locking problem. The message must be invalid in 
memory itself.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freedesktop.org/archives/dbus/attachments/20080222/e937f61c/attachment.pgp 


More information about the dbus mailing list