Переглянути джерело

add debug msgs (merge from devbr6)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@37649 15284696-431f-4ddb-bdfa-cd5b030d7da7
Hamish Bowman 16 роки тому
батько
коміт
11d07fa4ce
2 змінених файлів з 7 додано та 1 видалено
  1. 3 1
      general/g.gui/main.c
  2. 4 0
      lib/gis/spawn.c

+ 3 - 1
general/g.gui/main.c

@@ -85,8 +85,8 @@ int main(int argc, char *argv[])
 
     if (((gui_type_env && update->answer) &&
 	 strcmp(gui_type_env, type->answer) != 0) || !gui_type_env) {
-	G_message(_("<%s> is now the default GUI"), type->answer);
 	G_setenv("GRASS_GUI", type->answer);
+	G_message(_("<%s> is now the default GUI"), type->answer);
     }
     else {
 	if(update->answer)
@@ -100,6 +100,8 @@ int main(int argc, char *argv[])
 	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) {

+ 4 - 0
lib/gis/spawn.c

@@ -81,6 +81,8 @@ int G_spawn(const char *command, ...)
 	return -1;
     }
 
+    G_debug(3, "spawning '%s' ...", command);
+
     return _spawnvp(_P_WAIT, command, args);
 }
 
@@ -127,6 +129,8 @@ int G_spawn(const char *command, ...)
     if (sigprocmask(SIG_BLOCK, &block, &oldmask) < 0)
 	goto error_3;
 
+    G_debug(3, "forking '%s' ...", command);
+
     pid = fork();
 
     if (pid < 0) {