Why would a kill -2 not work?
cswiger at mac.com
Tue May 19 01:29:34 UTC 2009
On May 18, 2009, at 5:32 PM, Peter Steele wrote:
> No, I'm not sending a signal within a signal. The signal handler is
> KEEP_RUNNING = 0;
> This works fine, but at some point it seems to stop working. The app
> just continues to run as if it never received the -2 signal. We have
> to use a kill -9 to kill it, which we want to avoid because this
> prevents our shutdown code from executing.
The pthread_* calls you are making aren't listed as being safe to run
within the context of a signal handler, and could cause a thread
waiting on that condition to be unblocked and start running. Please
see earlier comments about mixing threads and signal handlers.
More information about the freebsd-questions