|
From: Dirk M. <dm...@me...> - 2004-04-30 17:52:57
|
I'm trying to have a sigint handler/thread that posts a semaphore, so the main thread (waiting on that sem) can cleanup everything and exit. (Basically showed in my earlier posts) I've tried all permutations of signal masks and handlers I can think off. I've also tried blocking SIGINT on all threads except one that is waiting for it. I can get any of these methods to work normally, but in valgrind I get one of several scenarios. Both valgrind and my code gets the signal, and valgrind exits immediately. Neither valgrind or my code gets any signal. Various nasty crashes. What I want is my code to get the signal, exit gracefully, and then valgrind will dump all its info and exit. Anyone know how to achieve this? Thanks everyone for all your help thus far. -Dirk |