Signals and Webware/WebKit
We occasionally spawn long-running processes from WebKit servlets, and sometimes they hang up. We'd like a way to detect this and abort cleanly. In process-land, we would have done this with os.signal, SIGALRM, and a signal handler. This isn't working out for us in a servlet, probably because signal handlers have to be in the main thread, and signals can only go to the main thread. We seem unable to get the signal propagated to the main thread. (And once we figure that out, we're wondering what happens if two or more child threads are running the same process and the main thread gets a signal.)
Has anybody got some pointers to information about how to do this? Not necessarily with signals, but the goal is simply to have a process/thread time out after a certain period if it's not finished.
Thanks for any insight you can offer.
David Hancock | email@example.com | 410-266-4384