diff --git a/src/ddprof.cc b/src/ddprof.cc index 971407e2..30a49940 100644 --- a/src/ddprof.cc +++ b/src/ddprof.cc @@ -92,7 +92,7 @@ DDRes ddprof_setup(DDProfContext &ctx) { if (ctx.params.fault_info) { struct sigaction sigaction_handlers = {}; sigaction_handlers.sa_sigaction = sigsegv_handler; - sigaction_handlers.sa_flags = SA_SIGINFO; + sigaction_handlers.sa_flags = SA_SIGINFO | SA_RESETHAND; sigaction(SIGSEGV, &(sigaction_handlers), nullptr); } diff --git a/test/simple_malloc.cc b/test/simple_malloc.cc index 140a3bdc..2c55165c 100644 --- a/test/simple_malloc.cc +++ b/test/simple_malloc.cc @@ -271,7 +271,7 @@ int main(int argc, char *argv[]) { try { struct sigaction sigaction_handlers = {}; sigaction_handlers.sa_sigaction = sigsegv_handler; - sigaction_handlers.sa_flags = SA_SIGINFO; + sigaction_handlers.sa_flags = SA_SIGINFO | SA_RESETHAND; sigaction(SIGSEGV, &(sigaction_handlers), nullptr); CLI::App app{"Simple allocation test"};