Why would a kill -2 not work?
psteele at maxiscale.com
Mon May 18 21:45:45 UTC 2009
>The amount of stuff you're allowed to do safely in a signal handler is
>pretty minimal-- you're better off setting a flag, returning from the
>signal handler, and having the next run past the main event loop or
>whatever check for the flag and handle things in a normal app
>context. If you try to do anything involving malloc() or s/printf,
>etc, you're running risks. "man sigaction" is likely to be
This is basically what we doing. When the handler is triggered we set a global variable to indicate the system is shutting down. I also signal a condition to wake up a sleeping thread. The lack of log messages indicate that this handler never gets called and the system carries on as if the kill -2 never happened.
More information about the freebsd-questions