@@ -670,7 +670,7 @@ void xrDebug::SetupExceptionHandler()
670670#else
671671 const auto minidumpFlags = MiniDumpWithDataSegs | MiniDumpWithIndirectlyReferencedMemory;
672672#endif
673-
673+
674674 BT_SetDumpType (minidumpFlags);
675675 // BT_SetSupportEMail("[email protected] "); 676676 BT_SetSupportEMail (
" [email protected] " );
@@ -817,7 +817,7 @@ static void unexpected_handler() { handler_base("unexpected program termination"
817817static void abort_handler (int signal) { handler_base (" application is aborting" ); }
818818static void floating_point_handler (int signal) { handler_base (" floating point error" ); }
819819static void illegal_instruction_handler (int signal) { handler_base (" illegal instruction" ); }
820- void segmentation_fault_handler (int signal) { throw std::runtime_error ( " segfault " ); }
820+ static void segmentation_fault_handler (int signal) { handler_base ( " segmentation fault " ); }
821821static void termination_handler (int signal) { handler_base (" termination with exit code 3" ); }
822822
823823void xrDebug::OnThreadSpawn ()
@@ -843,12 +843,12 @@ void xrDebug::OnThreadSpawn()
843843 std::set_unexpected(_terminate);
844844#endif
845845#else // WINDOWS
846- signal (SIGSEGV, sigsegv_handler);
847- std::set_terminate (_terminate);
848846 signal (SIGABRT, abort_handler);
849847 signal (SIGFPE, floating_point_handler);
850848 signal (SIGILL, illegal_instruction_handler);
851849 signal (SIGINT, 0 );
850+ signal (SIGTERM, termination_handler);
851+ signal (SIGSEGV, segmentation_fault_handler);
852852#endif
853853}
854854
0 commit comments