On Mon, Oct 08, 2007 at 04:03:09PM +0200, Mikael Magnusson wrote: > My observations follows: > > I'm running testing/unstable on Linux 2.6.18-3-k7, and onTimer isn't > called on my system since the main thread receives SIGALRM and not the > CiTimer thread. I can prevent this by using pthread_sigmask to block > SIGALRM in main. > > sigset_t cancel, old; > sigemptyset(&cancel); > sigaddset(&cancel, SIGALRM); > > pthread_sigmask(SIG_BLOCK, &cancel, &old);
correct. But this does not really fix the problem nor is it a usable workaround. When you create 2 threads CiTimer and block the signal in the main thread, one of the threads /the one you create first) produces a working onTimer() output. The second thread never gets into the onTimer(). So in a normal application where more threads use timers this will not help. So it seems that there was a change maybe in how signals are delivered to multithreaded applications which produces this bug. regards Mike -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]