411 Subj : Re: Using SIGALRM with pthread To : comp.programming.threads From : gc Date : Thu Jul 28 2005 10:04 am I am thinking about implementing a seperate timer thread as well. In my original implementation, the pthread_cond_wait is not interrupted by the signal. All the semaphores, pthread_mutex's and pthread_cond's are used for protecting shared variables and condition variables between the two threads. And in one of thread, I want to have an asynchronous alarm signal system that periodically updates certain data structures and perform certain tasks. By the way, my signal-catching function only belongs to one of the two threads. I wonder if anybody can give me a concrete explanation why is the use of signal handling in a thread can potentially cause many werid bugs. I have read from some resources that the signal handling function in a thread should be kept as simple as possible, but anybody can give a reason for this or suggests any good resource on this? I really appreciate your help, gc . 0