diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-03-02 10:19:25 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-03-02 10:19:25 +0000 |
commit | 9d8eb28ebd941694d8dcbc66c6e5c80cf90a206d (patch) | |
tree | 7b6e8cc1a84ea7234a57ce4d85131819d820b292 /debug.c | |
parent | b494d54b98e6240a20f494ecaa0bad646c531686 (diff) | |
download | rsyslog-9d8eb28ebd941694d8dcbc66c6e5c80cf90a206d.tar.gz rsyslog-9d8eb28ebd941694d8dcbc66c6e5c80cf90a206d.tar.xz rsyslog-9d8eb28ebd941694d8dcbc66c6e5c80cf90a206d.zip |
- added class tcps
- added class tcps_sess
- changed imtcp to use new classes; seems to work; imgssapi currently
broken
Diffstat (limited to 'debug.c')
-rw-r--r-- | debug.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -60,6 +60,7 @@ static int bPrintFuncDBOnExit = 0; /* shall the function entry and exit be logge static int bPrintMutexAction = 0; /* shall mutex calls be printed to the debug log? */ static int bPrintTime = 1; /* print a timestamp together with debug message */ static int bPrintAllDebugOnExit = 0; +static int bAbortTrace = 1; /* print a trace after SIGABRT or SIGSEGV */ static char *pszAltDbgFileName = NULL; /* if set, debug output is *also* sent to here */ static FILE *altdbg = NULL; /* and the handle for alternate debug output */ static FILE *stddbg; @@ -718,12 +719,15 @@ sigsegvHdlr(int signum) dbgprintf("\n\n\n\nSignal %d%s occured, execution must be terminated.\n\n\n\n", signum, signame); - dbgPrintAllDebugInfo(); + if(bAbortTrace) { + dbgPrintAllDebugInfo(); + dbgprintf("If the call trace is empty, you may want to ./configure --enable-rtinst\n"); + dbgprintf("\n\nTo submit bug reports, visit http://www.rsyslog.com/bugs\n\n"); + } - dbgprintf("If the call trace is empty, you may want to ./configure --enable-rtinst\n"); dbgprintf("\n\nTo submit bug reports, visit http://www.rsyslog.com/bugs\n\n"); - if(stddbg != NULL) fflush(stddbg); + if(altdbg != NULL) fflush(altdbg); /* and finally abort... */ /* TODO: think about restarting rsyslog in this case: may be a good idea, @@ -1172,6 +1176,8 @@ dbgGetRuntimeOptions(void) bPrintTime = 0; } else if(!strcasecmp((char*)optname, "nostdout")) { stddbg = NULL; + } else if(!strcasecmp((char*)optname, "noaborttrace")) { + bAbortTrace = 0; } else if(!strcasecmp((char*)optname, "filetrace")) { if(*optval == '\0') { fprintf(stderr, "Error: logfile debug option requires filename, " |