Browse Source

* Raise SIGFPE after catching it

Bryan Drewery 16 năm trước cách đây
mục cha
commit
2c82e1588c
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  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));