[GRASS-SVN] r47966 - grass/branches/develbranch_6/lib/db/dbmi_client
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Aug 30 02:13:12 EDT 2011
Author: mmetz
Date: 2011-08-29 23:13:12 -0700 (Mon, 29 Aug 2011)
New Revision: 47966
Modified:
grass/branches/develbranch_6/lib/db/dbmi_client/shutdown.c
Log:
db_shutdown_driver(): use G_wait(), fix for #1158
Modified: grass/branches/develbranch_6/lib/db/dbmi_client/shutdown.c
===================================================================
--- grass/branches/develbranch_6/lib/db/dbmi_client/shutdown.c 2011-08-30 06:11:32 UTC (rev 47965)
+++ grass/branches/develbranch_6/lib/db/dbmi_client/shutdown.c 2011-08-30 06:13:12 UTC (rev 47966)
@@ -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