/* This list comes from OpenMPI sources */
#ifdef HAVE_STRSIGNAL
- /* On segfault, avoid calling strsignal which may allocate some memory (through gettext) */
{
char* str;
- if (signum == 11)
- {
- str = "Segmentation fault";
- }
- else
- {
- str = strsignal(signum);
- }
+ str = strsignal(signum);
ret = snprintf(tmp, size, HOSTFORMAT "Signal: %s (%d)\n", stacktrace_hostname, getpid(), str, signum);
}
#else
fprintf(stderr, "Could not set handler for signal %d\n", signals[j]);
}
}
+
+#ifdef HAVE_STRSIGNAL
+ // initialize the glibc internal string representation.
+ strsignal(SIGABRT);
+#endif
}
static void* watchdog_thread(void* arg)