ecere/DualPipe: Fixed issue returning error code on Windows
authorJerome St-Louis <jerome@ecere.com>
Sat, 16 Feb 2013 05:50:31 +0000 (00:50 -0500)
committerJerome St-Louis <jerome@ecere.com>
Sat, 16 Feb 2013 05:50:31 +0000 (00:50 -0500)
- Linux version was waiting for process already

ecere/src/sys/DualPipe.c

index 44c938c..0fb60d5 100644 (file)
@@ -248,6 +248,8 @@ int DualPipe_GetExitCode(_DualPipe * dp)
    //return __WEXITSTATUS(status);
 #else
    int exitCode = 0;
+   // NOTE: This was inconsistent with Linux version waiting... Testing Suite would not return proper values
+   WaitForSingleObject(dp->hProcess, INFINITE);
    GetExitCodeProcess(dp->hProcess, (DWORD *)&exitCode);
    return exitCode;
 #endif