- void *array[300];
- size_t size;
- char **strings;
-
- signal(SIGALRM, SIG_IGN);
- signal(SIGPIPE, SIG_IGN);
- signal(SIGTERM, SIG_IGN);
- signal(SIGABRT, SIG_IGN);
- signal(SIGSEGV, SIG_IGN);
- signal(SIGURG, SIG_IGN);
- signal(SIGKILL, SIG_IGN);
- log(DEFAULT,"*** fell down a pothole in the road to perfection ***");
-#ifdef HAS_EXECINFO
- log(DEFAULT,"Please report the backtrace lines shown below with any bugreport to the bugtracker at http://www.inspircd.org/bugtrack/");
- size = backtrace(array, 30);
- strings = backtrace_symbols(array, size);
- for (size_t i = 0; i < size; i++) {
- log(DEFAULT,"[%d] %s", i, strings[i]);
- }
- free(strings);
-#else
- log(DEFAULT,"You do not have execinfo.h so i could not backtrace -- on FreeBSD, please install the libexecinfo port.");
-#endif
- signal(SIGSEGV, SIG_DFL);
- if (raise(SIGSEGV) == -1)
- {
- log(DEFAULT,"What the hell, i couldnt re-raise SIGSEGV! Error: %s",strerror(errno));
- }
- Exit(status);