On Thursday 09 August 2007 16:57:18 Joost Yervante Damad wrote: > In my opinion the problem still persists. All you did is change it from > awaking a lot to awaking a little less (2x a second). My preferred solution > would only wake up when needed. Are you absolutely positive that blocking > infinite makes the the application not stop on SIGTERM? > I really doubt it.
I agree that the correct solution is to not have the program wake up on a timer at all. Of course blocking forever prevents the program terminating, a quick test confirms this. Have you tried it? There is no reason to think that without some special handling the program will ever leave the while loop, even if it receives a signal. All the signal handler does is to set a flag. After it returns, control will simply pass back to whichever part of the dbus library is waiting for messages. There are a number of solutions to this problem (longjmp, dbus message, ignoring cleanup, ...), but I don't have the time to investigate them at the moment. Sorry... Bruce
smime.p7s
Description: S/MIME cryptographic signature