[GRASS-SVN] r47969 - grass/branches/releasebranch_6_4/lib/db/dbmi_client

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Aug 30 02:18:44 EDT 2011


Author: mmetz
Date: 2011-08-29 23:18:44 -0700 (Mon, 29 Aug 2011)
New Revision: 47969

Modified:
   grass/branches/releasebranch_6_4/lib/db/dbmi_client/shutdown.c
Log:
db_shutdown_driver(): use G_wait(), fix for #1158

Modified: grass/branches/releasebranch_6_4/lib/db/dbmi_client/shutdown.c
===================================================================
--- grass/branches/releasebranch_6_4/lib/db/dbmi_client/shutdown.c	2011-08-30 06:17:46 UTC (rev 47968)
+++ grass/branches/releasebranch_6_4/lib/db/dbmi_client/shutdown.c	2011-08-30 06:18:44 UTC (rev 47969)
@@ -58,14 +58,8 @@
     /* wait for the driver to finish */
     status = -1;
 
-#ifdef __MINGW32__
-    /* TODO: convert status to something like from wait? */
-    _cwait(&status, driver->pid, WAIT_CHILD);
-#else
-    /* TODO: Should not be here waitpid() ? */
-    while ((pid = wait(&status)) > 0 && pid != driver->pid) {
-    }
-#endif
+    /* convert status according to return code of G_wait() */
+    status = G_wait(driver->pid) == -1 ? -1 : 0;
 
     driver->pid = 0;
 



More information about the grass-commit mailing list