From 0f1365093f448e9503b618a5097eb8d6433e7710 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 22 Jul 2010 00:55:23 +0100 Subject: Trap SIGABRT so that get backtrace in the log. Improve handling of notification objects, and the printing of same to the logs. --- lib/log.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/log.c') diff --git a/lib/log.c b/lib/log.c index 32b11b76..72f967f6 100644 --- a/lib/log.c +++ b/lib/log.c @@ -38,6 +38,7 @@ #endif #include "qpthreads.h" #include "qfstring.h" +#include "sigevent.h" /* log is protected by the same mutext as vty, see comments in vty.c */ @@ -519,6 +520,13 @@ zlog_signal(int signo, const char *action #undef LOC } +/* Ring down the curtain -- turn of SIGABRT handler and abort() */ +void zabort_abort(void) +{ + quagga_sigabrt_no_trap() ; + abort() ; +} + /* Log a backtrace using only async-signal-safe functions. Needs to be enhanced to support syslog logging. */ void @@ -776,7 +784,7 @@ zlog_abort (const char *mess) uzlog(NULL, LOG_CRIT, "%s", mess); uzlog_backtrace(LOG_CRIT); - abort(); + zabort_abort(); } -- cgit v1.2.3