pthread_cleanup_push(...) ==> pthread_cleanup_pop(...)
If you use one, you *MUST* use the other one.
At the end of your function: static void *alarm_thread(void *arg)
Add: pthread_cleanup_pop(0);
Thank you! That's one man page it doesn't pay to skim!
-- ======================================================================== Ian Pilcher i.pilcher@xxxxxxxxxxx ========================================================================