Browse Source

fix for ticket https://trac.osgeo.org/grass/ticket/1158, to be backported after G_wait is backported

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@47931 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 13 years ago
parent
commit
4604d673b2
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lib/db/dbmi_client/shutdown.c

+ 2 - 2
lib/db/dbmi_client/shutdown.c

@@ -59,8 +59,8 @@ int db_shutdown_driver(dbDriver * driver)
     status = -1;
 
 #ifdef __MINGW32__
-    /* TODO: convert status to something like from wait? */
-    _cwait(&status, driver->pid, WAIT_CHILD);
+    /* convert status according to return code of G_wait() */
+    status = G_wait(driver->pid) == -1 ? -1 : 0;
 #else
     /* TODO: Should not be here waitpid() ? */
     while ((pid = wait(&status)) > 0 && pid != driver->pid) {