June 3, 2015
9:51 a.m.
I am making a little watchdog (in C++) for spawning forked pharo image processes and detecting when they crash (for ex, memory exhausted and/or killed) so it can restart the image. It works, but for now I have only 1 remaining thing: How can I detect from outside, when pharo process is hanged and not responsive? I am thinking something like sending SIGUSR1 (which should output a backtrace) and if nothing is produced, then kill the pid. The problem is that when I do so, then image is completelly unresponsive (all is blank and not responsive to any event, click and so). Is there anything better?