platforms: don't catch floating point errors

When this triggered it actually just kept printing
"floating point exception" and never recovered. By removing this we can
at least catch it with a core dump, in CI as well as locally.
This commit is contained in:
Julian Oes
2020-04-09 14:08:43 +02:00
parent dc95b4487c
commit 474c3c45f0

View File

@@ -93,7 +93,6 @@ void init_once();
}
static void sig_int_handler(int sig_num);
static void sig_fpe_handler(int sig_num);
static void register_sig_handler();
static void set_cpu_scaling();
@@ -404,11 +403,6 @@ void register_sig_handler()
sig_int.sa_handler = sig_int_handler;
sig_int.sa_flags = 0;// not SA_RESTART!
// SIGFPE
struct sigaction sig_fpe {};
sig_fpe.sa_handler = sig_fpe_handler;
sig_fpe.sa_flags = 0;// not SA_RESTART!
// SIGPIPE
// We want to ignore if a PIPE has been closed.
struct sigaction sig_pipe {};
@@ -423,7 +417,6 @@ void register_sig_handler()
#endif
sigaction(SIGTERM, &sig_int, nullptr);
sigaction(SIGFPE, &sig_fpe, nullptr);
sigaction(SIGPIPE, &sig_pipe, nullptr);
}
@@ -436,15 +429,6 @@ void sig_int_handler(int sig_num)
_exit_requested = true;
}
void sig_fpe_handler(int sig_num)
{
fflush(stdout);
printf("\nfloating point exception\n");
fflush(stdout);
px4_daemon::Pxh::stop();
_exit_requested = true;
}
void set_cpu_scaling()
{
#ifdef __PX4_POSIX_EAGLE