فهرست منبع

* 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));