소스 검색

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