[GRASS-SVN] r40532 - grass/trunk/lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jan 18 10:02:10 EST 2010
Author: huhabla
Date: 2010-01-18 10:02:10 -0500 (Mon, 18 Jan 2010)
New Revision: 40532
Modified:
grass/trunk/lib/gis/error.c
Log:
In G_fatal_error(): raise SIGSEGV if environment variable GRASS_SIGSEGV_ON_ERROR is set.
Modified: grass/trunk/lib/gis/error.c
===================================================================
--- grass/trunk/lib/gis/error.c 2010-01-18 14:27:06 UTC (rev 40531)
+++ grass/trunk/lib/gis/error.c 2010-01-18 15:02:10 UTC (rev 40532)
@@ -17,10 +17,10 @@
#include <unistd.h>
#include <time.h>
#include <stdarg.h>
+#include <signal.h>
#include <sys/types.h>
#include <grass/glocale.h>
#include <grass/gis.h>
-
/*!
* \def MSG
*
@@ -159,6 +159,13 @@
G__call_error_handlers();
+ /* Raise SIGSEGV, useful for debugging only.
+ * Type "export GRASS_SIGSEGV_ON_ERROR=1"
+ * to enable this feature using bash.
+ */
+ if (getenv("GRASS_SIGSEGV_ON_ERROR"))
+ raise(SIGSEGV);
+
exit(EXIT_FAILURE);
}
More information about the grass-commit
mailing list