[sheepdog] [PATCH] call a default signal handler in crash_handler()

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Fri Apr 12 09:11:30 CEST 2013

At Fri, 12 Apr 2013 15:00:18 +0800,
Liu Yuan wrote:
> On 04/12/2013 02:53 PM, MORITA Kazutaka wrote:
> > If we don't call the default handler by re-raising the signal, the
> > process doesn't dump a core file.  Actually, current collie and logger
> > cannot generate a core file.
> > 
> > Sheep can generate a core file on my environment because the default
> > handler is called after crash_handler().  However, the behavior of the
> > process when we don't exit in the SIGSEGV handler is not defined
> > according to POSIX.  If we call exit() in crash_handler(), we cannot
> > get the core file.
> Okay, the intention is clear. But I don't still understand the comment
> in sd_printf(). This is called inside crash_handler. So this means
> logger is terminated but sheep who receive the signal will continue run?
> The 'process' in the comment is kind of obscure

Do you mean crash_handler() in logger.c?  The re-raised signal will be
sent to itself (the logger process), so it doesn't terminate sheep.
The string should be "default handler for signal xxx didn't terminate
the logger process"?



More information about the sheepdog mailing list