in reply to Re: SIG{ALRM} to help kill external program in thread SIG{ALRM} to help kill external program
kennethk,
I want to thank you for your suggestion of using threads. I have implemented a dual thread setup that uses a shared variable for tracking completion of thread 1, which launches the external application. Thread 2 monitors the value of the shared variable, and after several loops of checking state on the variable, it either ends the thread (which means that thread 1 completes), or it kills all threads, because thread 1 has been hung up (which means the external app did not complete. It works very well, and I intend to post after I clean up the code for final. Thank you very much for everyones' input.
|