mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
posix: remove segfault handler
I could not get a core dump without removing the segfault handler, hence this change.
This commit is contained in:
parent
f3620f7018
commit
35074aaffd
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user