Dbus calls interlock issue
Scott James Remnant
scott at canonical.com
Fri Feb 13 08:21:10 PST 2009
On Fri, 2009-02-13 at 15:50 +0000, Simon McVittie wrote:
> One of the few safe things to do is write the pid to a pipe (as in pipe(2))
> and return; whenever a pid can be read from the other end of the pipe in
> your main loop, do your cleanup and D-Bus interactions there.
>
Though note that if you spawn a large number of children, it is possible
for this pipe to be filled such that the signal handled blocks on
write()
It's generally better to use pselect() or ppoll() and otherwise mask
SIGCHLD out from your process.
Scott
--
Scott James Remnant
scott at canonical.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/dbus/attachments/20090213/871ec517/attachment.pgp
More information about the dbus
mailing list