On Thu, Jul 22, 2010 at 2:42 PM, Paul DeBruicker <pdebruic@gmail.com> wrote:

Hi Eliot,
just looks like the OS/run-time is not letting the program set a handler for
SIGUSR2 and/or not allowing it to be caught.  This is a deal breaker.  Why
it's happening I don't know, but currently Cog's heartbeat on linux depends
on being able to catch SIGUSR2.

HTH
Eliot
 



>From reading this:

http://manpages.ubuntu.com/manpages/lucid/man7/signal.7.html

it looks like Ubuntu defaults to terminate the program on SIGUSR2.


Would it be appropriate to use sigaction() somewhere in the VM code to override the OS's default setting for SIGUSR2?  

That's exactly what the code does.  Look at uses of TICKER_SIGNAL in platforms/unix/vm/sqUnixHeartbeat.c.  WJat Derek points out is that on certain (I thought long gone) LinuxThreads implementations SIGUSR1 & SIGUSR2 are reserved by the threads implementation and used internally.  One cant use them in these contexts.  So that means a) finding out at compile time whether we're in this regime or not and b) choosing some alternative signals (one for the ticker (USR2), one for dumping all stacks (USR2)).

best
Eliot

 
I think you could change it from terminate to ignore.

http://opengroup.org/onlinepubs/007908775/xsh/sigaction.html

For SIGUSR2 the int sig value is 12

Or do you know if its an environment setting I can change?

Thanks for your help

Paul