mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-23 03:05:48 +03:00
38 lines
834 B
Diff
38 lines
834 B
Diff
diff --git a/src/sighand.c b/src/sighand.c
|
|
index 8752ae1..b30682c 100644
|
|
--- a/src/sighand.c
|
|
+++ b/src/sighand.c
|
|
@@ -27,8 +27,9 @@
|
|
|
|
#include "debug_utils.h"
|
|
#include "processes.h"
|
|
-
|
|
+#ifdef HAVE_EXECINFO_H
|
|
#include <execinfo.h> /* for backtrace() */
|
|
+#endif
|
|
#include <glib.h> /* for G_LOG_DOMAIN, for g_critical() */
|
|
#include <signal.h> /* for kill() */
|
|
#include <sys/wait.h> /* for waitpid() */
|
|
@@ -113,6 +114,7 @@ sighand_chld (int sig)
|
|
waitpid (-1, NULL, WNOHANG);
|
|
}
|
|
|
|
+#ifdef HAVE_EXECINFO_H
|
|
static void
|
|
print_trace (void)
|
|
{
|
|
@@ -131,11 +133,14 @@ print_trace (void)
|
|
|
|
g_free (strings);
|
|
}
|
|
+#endif
|
|
|
|
void
|
|
sighand_segv (int given_signal)
|
|
{
|
|
+#ifdef HAVE_EXECINFO_H
|
|
print_trace ();
|
|
+#endif
|
|
make_em_die (SIGTERM);
|
|
gvm_close_sentry ();
|
|
/* Raise signal again, to exit with the correct return value,
|