Blob Blame History Raw
From b901efc638080e552fb94d7842775f1aaf95c0dd Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
Date: Thu, 27 Feb 2014 10:35:59 +0100
Subject: [PATCH 37/41] Drop SEGV handler

The generated tracebacks are mostly useless without debuginfo (which is likely
not present if the crash is not anticipated) and prevent ABRT from doing a
better job.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
---
 grubby.c | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/grubby.c b/grubby.c
index 407c65d..a2b0d55 100644
--- a/grubby.c
+++ b/grubby.c
@@ -4163,21 +4163,6 @@ int addNewKernel(struct grubConfig * config, struct singleEntry * template,
     return 0;
 }
 
-static void traceback(int signum)
-{
-    void *array[40];
-    size_t size;
-
-    signal(SIGSEGV, SIG_DFL);
-    memset(array, '\0', sizeof (array));
-    size = backtrace(array, 40);
-
-    fprintf(stderr, "grubby received SIGSEGV!  Backtrace (%ld):\n",
-            (unsigned long)size);
-    backtrace_symbols_fd(array, size, STDERR_FILENO);
-    exit(1);
-}
-
 int main(int argc, const char ** argv) {
     poptContext optCon;
     const char * grubConfig = NULL;
@@ -4316,8 +4301,6 @@ int main(int argc, const char ** argv) {
 
     useextlinuxmenu=0;
 
-    signal(SIGSEGV, traceback);
-
     int i = 0;
     for (int j = 1; j < argc; j++)
 	i += strlen(argv[j]) + 1;
-- 
2.4.3