SIGPIPE and DBus
Steve Kreyer
steve.kreyer at web.de
Sun Sep 23 12:05:38 PDT 2007
Hi.
Thiago Macieira wrote:
> D-Bus doesn't use pipes for IPC, but local sockets. The semantics are very
> similar. In special, trying to write to a socket whose reading end has
> closed will generate SIGPIPE.
>
> However, the D-Bus daemon doesn't close the socket unless the application
> has sent an invalid message. Therefore, if you're getting a SIGPIPE *and*
> the cause is D-Bus closing its socket, verify that your binding isn't
> sending an invalid message.
>
Your help has brought me on the right way. The application emits signals
from diffrent threads. So if two threads write to one socket at the same
time, I think, things get messed up and this propably leads to a
mailformed message. I wasn't aware that these sections, where the
signals are emitted, must be mutual excluded. I thouhgt, if this
function (g_signal_emit, since I use the the glib-binding) could cause
race condiditions they should be thread safe by default. This was a less
or more wrong assumption.
> It's more likely that the issue isn't D-Bus.
>
Many thanks,
Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3245 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.freedesktop.org/archives/dbus/attachments/20070923/cf160e48/attachment.bin
More information about the dbus
mailing list