[GRASS-SVN] r38767 - grass/trunk/raster/r.li/r.li.daemon

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Aug 17 03:56:00 EDT 2009


Author: hamish
Date: 2009-08-17 03:55:58 -0400 (Mon, 17 Aug 2009)
New Revision: 38767

Modified:
   grass/trunk/raster/r.li/r.li.daemon/daemon.c
Log:
messags & whitespace

Modified: grass/trunk/raster/r.li/r.li.daemon/daemon.c
===================================================================
--- grass/trunk/raster/r.li/r.li.daemon/daemon.c	2009-08-17 06:56:51 UTC (rev 38766)
+++ grass/trunk/raster/r.li/r.li.daemon/daemon.c	2009-08-17 07:55:58 UTC (rev 38767)
@@ -229,7 +229,9 @@
 		/*printf("todo2 ");fflush(stdout); *//*TODO scrivere su raster */
 	    }
 	}
+
 	i--;
+
 	while (j < WORKERS && donePid != child[j].pid)
 	    j++;
 
@@ -237,20 +239,24 @@
 	m.f.f_t.pid = mypid;
 	send(child[j].channel, &m);
 	wait(&status);
+
 	if (!(WIFEXITED(status)))
-	    G_message(_("r.li.worker (pid %i) exited with abnormal status %i"),
-		      donePid, status);
+	    G_warning(
+		    _("r.li.worker (pid %i) exited with abnormal status: %i"),
+		    donePid, status);
 	else
-	    G_message(_("r.li.worker (pid %i) terminated"), donePid);
+	    G_verbose_message(
+		    _("r.li.worker (pid %i) terminated successfully"),
+		    donePid);
 
-	/*remove pipe */
+	/* remove pipe */
 	if (close(child[j].channel) != 0)
 	    G_message(_("Cannot close %s file (PIPE)"), child[j].pipe);
 	if (unlink(child[j].pipe) != 0)
 	    G_message(_("Cannot delete %s file (PIPE)"), child[j].pipe);
     }
 
-    /*kill childs without Job */
+    /* kill children without Job */
     for (i = withoutJob; i < WORKERS; i++) {
 	int status;
 
@@ -258,22 +264,28 @@
 	m.f.f_t.pid = mypid;
 	send(child[i].channel, &m);
 	wait(&status);
+
 	if (!(WIFEXITED(status)))
-	    G_message(_("r.li.worker (pid %i) exited with abnormal status %i"),
-		      child[i].pid, status);
+	    G_warning(
+		    _("r.li.worker (pid %i) exited with abnormal status: %i"),
+		    child[i].pid, status);
 	else
-	    G_message(_("r.li.worker (pid %i) terminated"), child[i].pid);
-	/*remove pipe */
+	    G_verbose_message(
+		    _("r.li.worker (pid %i) terminated successfully"),
+		    child[i].pid);
+
+	/* remove pipe */
 	if (close(child[i].channel) != 0)
 	    G_message(_("Cannot close %s file (PIPE2)"), child[i].pipe);
 	if (unlink(child[i].pipe) != 0)
 	    G_message(_("Cannot delete %s file (PIPE2)"), child[i].pipe);
     }
+
+
     /*################################################
        --------------delete tmp files------------------
        ################################################ */
 
-
     if (parsed == MVWIN) {
 	write_raster(mv_fd, random_access, g);
 	close(random_access);
@@ -284,14 +296,16 @@
 	Rast_write_history(output, &history);
     }
 
-
     if (close(receiveChannel) != 0)
 	G_message(_("Cannot close receive channel file"));
+
     if (unlink(reportChannelName) != 0)
 	G_message(_("Cannot delete %s file"), child[i].pipe);
+
     return 1;
 }
 
+
 int parseSetup(char *path, list l, g_areas g, char *raster)
 {
     struct stat s;



More information about the grass-commit mailing list