Signals, some are dropped?

John (J5) Palmieri johnp at redhat.com
Thu Feb 1 14:09:03 PST 2007


On Thu, 2007-02-01 at 14:42 -0500, Kevin DeKorte wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi All,
> 
> Recently I have written some code that processes signals using the
> lowlevel dbus api. The odd part is that my code does not seem to be
> receiving all the signals sent to it. I can use dbus-send to send the
> same signal and sometimes my code gets it and sometimes it doesn't. It
> is not even one of those cases where it gets 2 and then misses one and
> then gets 2 and misses 1.
> 
> I have a match setup and it calls my signal handler which all it does is
> print the signal info and then exit. I can sent the signal say 5 times
> and the handler will be called only 3 of those times. Is there anything
> I can do to improve this..
> 

I compiled your code and added a mainloop and did this with no issues:

for a in `seq 100` ; do dbus-send --session
--type=signal /org/freedesktop com.my.interface.sig$a; done

Worked fine on dbus-1.0.1-9.fc6


-- 
John (J5) Palmieri <johnp at redhat.com>



More information about the dbus mailing list