Kaynağa Gözat

Replace SIGSEGV-on-error with SIGABRT-on-error

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@60289 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 11 yıl önce
ebeveyn
işleme
4c7c0d915c
1 değiştirilmiş dosya ile 4 ekleme ve 5 silme
  1. 4 5
      lib/gis/error.c

+ 4 - 5
lib/gis/error.c

@@ -17,7 +17,6 @@
 #include <unistd.h>
 #include <unistd.h>
 #include <time.h>
 #include <time.h>
 #include <stdarg.h>
 #include <stdarg.h>
-#include <signal.h>
 #include <sys/types.h>
 #include <sys/types.h>
 #include <grass/glocale.h>
 #include <grass/glocale.h>
 #include <grass/gis.h>
 #include <grass/gis.h>
@@ -161,12 +160,12 @@ void G_fatal_error(const char *msg, ...)
 
 
     G__call_error_handlers();
     G__call_error_handlers();
 
 
-    /* Raise SIGSEGV, useful for debugging only.
-     * Type "export GRASS_SIGSEGV_ON_ERROR=1"
+    /* Raise SIGABRT, useful for debugging only.
+     * Type "export GRASS_ABORT_ON_ERROR=1"
      * to enable this feature using bash.
      * to enable this feature using bash.
      */
      */
-    if (getenv("GRASS_SIGSEGV_ON_ERROR"))
-        raise(SIGSEGV);
+    if (getenv("GRASS_ABORT_ON_ERROR"))
+        abort();
 
 
     exit(EXIT_FAILURE);
     exit(EXIT_FAILURE);
 }
 }