Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

posix: restore original SEGV signal handler upon first entry of our handler #12099

Merged
merged 1 commit into from
May 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
posix: restore original SEGV signal handler upon first entry of our h…
…andler

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.
bkueng committed May 29, 2019

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit a77d73ac9b12b6c86e3335c2b316a3d1b47e5115
2 changes: 1 addition & 1 deletion platforms/posix/src/main.cpp
Original file line number Diff line number Diff line change
@@ -405,7 +405,7 @@ void register_sig_handler()
// SIGSEGV
struct sigaction sig_segv {};
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
// Do not catch SIGINT on Cygwin such that the process gets killed