diff options
author | root <root@hestia.halldom.com> | 2010-07-22 00:55:23 +0100 |
---|---|---|
committer | root <root@hestia.halldom.com> | 2010-07-22 00:55:23 +0100 |
commit | 0f1365093f448e9503b618a5097eb8d6433e7710 (patch) | |
tree | 5db698d8d51a441aacd0f5d8ed6e83458bee294c /lib/log.c | |
parent | 378deb2ebf5b34c053f212e14aa0c9d62c4bc85d (diff) | |
download | quagga-0f1365093f448e9503b618a5097eb8d6433e7710.tar.bz2 quagga-0f1365093f448e9503b618a5097eb8d6433e7710.tar.xz |
Trap SIGABRT so that get backtrace in the log.
Improve handling of notification objects, and the printing of same
to the logs.
Diffstat (limited to 'lib/log.c')
-rw-r--r-- | lib/log.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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(); } |