Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Rainer Weikusat
May 15, 2012, 11:08 am
rate this thread
SIGALRM is a so-called asynchronous signal and this means that it may
be handled by any thread not currently blocking it, IOW, this can't
work: There will be one SIGALRM generated for the process once the
alarm expires, no matter how many threads were started and this will
interrupt one (arbitrarily selected) thread (your signal handler is
also not 'safe', meaning, should be process be doing something more
complicated than executing an inifinite loop or being blocked in a
system call, all kinds of weird things can result).