Преглед изворни кода

* Raise SIGFPE after catching it

Bryan Drewery пре 16 година
родитељ
комит
2c82e1588c
1 измењених фајлова са 5 додато и 1 уклоњено
  1. 5 1
      src/debug.c

+ 5 - 1
src/debug.c

@@ -195,7 +195,11 @@ static void got_fpe(int z)
 {
   write_debug();
   fatal("FLOATING POINT ERROR -- CRASHING!", 0);
-  exit(1);		/* for GCC noreturn */
+#ifdef DEBUG
+  raise(SIGFPE);
+#else
+  exit(1);
+#endif /* DEBUG */
 }
 
 static void got_term(int) __attribute__ ((noreturn));