[GRASS-SVN] r37649 - in grass/trunk: general/g.gui lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Sun May 31 08:18:58 EDT 2009


Author: hamish
Date: 2009-05-31 08:18:58 -0400 (Sun, 31 May 2009)
New Revision: 37649

Modified:
   grass/trunk/general/g.gui/main.c
   grass/trunk/lib/gis/spawn.c
Log:
add debug msgs (merge from devbr6)

Modified: grass/trunk/general/g.gui/main.c
===================================================================
--- grass/trunk/general/g.gui/main.c	2009-05-31 12:11:21 UTC (rev 37648)
+++ grass/trunk/general/g.gui/main.c	2009-05-31 12:18:58 UTC (rev 37649)
@@ -85,8 +85,8 @@
 
     if (((gui_type_env && update->answer) &&
 	 strcmp(gui_type_env, type->answer) != 0) || !gui_type_env) {
+	G_setenv("GRASS_GUI", type->answer);
 	G_message(_("<%s> is now the default GUI"), type->answer);
-	G_setenv("GRASS_GUI", type->answer);
     }
     else {
 	if(update->answer)
@@ -100,6 +100,8 @@
 	exit(EXIT_SUCCESS);
 
 
+    G_debug(1, "Attempting to start '%s' GUI ...", type->answer);
+
     if (strcmp(type->answer, "wxpython") == 0) {
 	sprintf(progname, "%s/etc/wxpython/wxgui.py", G_gisbase());
 	if (rc_file->answer) {

Modified: grass/trunk/lib/gis/spawn.c
===================================================================
--- grass/trunk/lib/gis/spawn.c	2009-05-31 12:11:21 UTC (rev 37648)
+++ grass/trunk/lib/gis/spawn.c	2009-05-31 12:18:58 UTC (rev 37649)
@@ -81,6 +81,8 @@
 	return -1;
     }
 
+    G_debug(3, "spawning '%s' ...", command);
+
     return _spawnvp(_P_WAIT, command, args);
 }
 
@@ -127,6 +129,8 @@
     if (sigprocmask(SIG_BLOCK, &block, &oldmask) < 0)
 	goto error_3;
 
+    G_debug(3, "forking '%s' ...", command);
+
     pid = fork();
 
     if (pid < 0) {



More information about the grass-commit mailing list