From 35074aaffdbc8edff185aac644ff33739b05eec9 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Thu, 30 May 2019 08:14:13 +0200 Subject: [PATCH] posix: remove segfault handler I could not get a core dump without removing the segfault handler, hence this change. --- platforms/posix/src/main.cpp | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/platforms/posix/src/main.cpp b/platforms/posix/src/main.cpp index 8d3ff7be41..63f3532c06 100644 --- a/platforms/posix/src/main.cpp +++ b/platforms/posix/src/main.cpp @@ -95,7 +95,6 @@ void init_once(); static void sig_int_handler(int sig_num); static void sig_fpe_handler(int sig_num); -static void sig_segv_handler(int sig_num); static void register_sig_handler(); static void set_cpu_scaling(); @@ -402,11 +401,6 @@ void register_sig_handler() struct sigaction sig_pipe {}; sig_pipe.sa_handler = SIG_IGN; - // SIGSEGV - struct sigaction sig_segv {}; - sig_segv.sa_handler = sig_segv_handler; - sig_segv.sa_flags = SA_RESTART | SA_SIGINFO | SA_RESETHAND; - #ifdef __PX4_CYGWIN // Do not catch SIGINT on Cygwin such that the process gets killed // TODO: All threads should exit gracefully see https://github.com/PX4/Firmware/issues/11027 @@ -418,7 +412,6 @@ void register_sig_handler() //sigaction(SIGTERM, &sig_int, nullptr); sigaction(SIGFPE, &sig_fpe, nullptr); sigaction(SIGPIPE, &sig_pipe, nullptr); - sigaction(SIGSEGV, &sig_segv, nullptr); } void sig_int_handler(int sig_num) @@ -439,13 +432,6 @@ void sig_fpe_handler(int sig_num) _exit_requested = true; } -void sig_segv_handler(int sig_num) -{ - fflush(stdout); - printf("\nSegmentation Fault\n"); - fflush(stdout); -} - void set_cpu_scaling() { #ifdef __PX4_POSIX_EAGLE