I know you already learned about the "Right Way (tm)", but here is an additional comment to your suggestion:
You should not rely on SIGUSR. Some versions of the Linux/glibc pthread implementation are using SIGUSR internally. And besides, signal handling in a multithreaded application is hard to get right. Better don't do this and use something that can be handled synchronously. Regards Jörg > -----Ursprüngliche Nachricht----- > Von: Matt Flax [mailto:[EMAIL PROTECTED]] > Gesendet am: Freitag, 19. Oktober 2001 03:09 > An: gatewayZgalore > Betreff: watchdog support > > Hello all, > > Thanks to nclarey for adding my retry patch to the CVS. > I await the day I get CVS access ! > > OK - I need to implement a watchdog signal handler for kannel. > Firstly I am assuming it doesn't exist ? > > Now I am changing the static setup_signal_handlers function to add : > sigaction(SIGUSR1, &act, NULL); > > And in the signal_handler function I add the following : > } else if (signum == SIGUSR1) { > to handle the watchdo signal USR1. > > I would like to be able to check wether bearerbox and a > particular smsc_at > module is alive or has hung ... can anyone suggest a good > method to do > that ? > It might be possible to get away with just polling bearerbox .... > > -- > Matt > > For electronic musicians ... > Vector Bass : http://mffmvectorbass.sourceforge.net/ > For developers ... > 3D Audio Library : http://mffm3daudiolib.sourceforge.net/ > Multimedia Time Code : http://mffmtimecode.sourceforge.net/ >