[GRASS-SVN] r38768 -
grass/branches/develbranch_6/raster/r.li/r.li.daemon
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Aug 17 03:58:57 EDT 2009
Author: hamish
Date: 2009-08-17 03:58:56 -0400 (Mon, 17 Aug 2009)
New Revision: 38768
Modified:
grass/branches/develbranch_6/raster/r.li/r.li.daemon/daemon.c
Log:
messages & whitespace (merge from trunk)
Modified: grass/branches/develbranch_6/raster/r.li/r.li.daemon/daemon.c
===================================================================
--- grass/branches/develbranch_6/raster/r.li/r.li.daemon/daemon.c 2009-08-17 07:55:58 UTC (rev 38767)
+++ grass/branches/develbranch_6/raster/r.li/r.li.daemon/daemon.c 2009-08-17 07:58:56 UTC (rev 38768)
@@ -219,7 +219,9 @@
/*printf("todo2 ");fflush(stdout); *//*TODO scrivere su raster */
}
}
+
i--;
+
while (j < WORKERS && donePid != child[j].pid)
j++;
@@ -227,20 +229,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;
@@ -248,22 +254,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);
@@ -274,14 +286,16 @@
G_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