mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 11:59:17 +08:00
posix: restore original SEGV signal handler upon first entry of our handler
The current SEGV handling on posix is not useful: as soon as our handler is left, it's triggered again, infinitely. This patch changes to restore the original handler, so the OS can create a core dump, etc.
This commit is contained in:
@@ -405,7 +405,7 @@ void register_sig_handler()
|
|||||||
// SIGSEGV
|
// SIGSEGV
|
||||||
struct sigaction sig_segv {};
|
struct sigaction sig_segv {};
|
||||||
sig_segv.sa_handler = sig_segv_handler;
|
sig_segv.sa_handler = sig_segv_handler;
|
||||||
sig_segv.sa_flags = SA_RESTART | SA_SIGINFO;
|
sig_segv.sa_flags = SA_RESTART | SA_SIGINFO | SA_RESETHAND;
|
||||||
|
|
||||||
#ifdef __PX4_CYGWIN
|
#ifdef __PX4_CYGWIN
|
||||||
// Do not catch SIGINT on Cygwin such that the process gets killed
|
// Do not catch SIGINT on Cygwin such that the process gets killed
|
||||||
|
|||||||
Reference in New Issue
Block a user