On Tue, 2007-06-26 at 16:39 +0200, [EMAIL PROTECTED] wrote: > I am not sure pthread_cond_wait() would help here. From its manpage I see: > > ASYNC-SIGNAL SAFETY > The condition functions are not async-signal safe, and should not be > called from a signal handler. In particular, calling pthread_cond_sig- > nal or pthread_cond_broadcast from a signal handler may deadlock the > calling thread. > > So pthread_cond_signal() can't be used in HPReCheckSerialReaders() called from > signal_reload(). > > Am I right?
You are right. Which means the only way I know of to handle the signal synchronously is the pipe() trick that I used in the patch. I guess is doesn't matter that it isn't portable as signal_reload() only happens under Unix anyway, so the solution to handling it only has to work under Unix. A couple of judicious #ifdef's should fix the portability problem. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]