Created
August 13, 2014 13:39
-
-
Save Tak/bf3ff96173cc34dcd613 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/mono/io-layer/processes.c b/mono/io-layer/processes.c | |
index 02665dd..25af22d 100644 | |
--- a/mono/io-layer/processes.c | |
+++ b/mono/io-layer/processes.c | |
@@ -1723,6 +1723,7 @@ gboolean GetExitCodeProcess (gpointer process, guint32 *code) | |
if(code==NULL) { | |
return(FALSE); | |
} | |
+ *code = STILL_ACTIVE; | |
if ((GPOINTER_TO_UINT (process) & _WAPI_PROCESS_UNHANDLED) == _WAPI_PROCESS_UNHANDLED) { | |
/* This is a pseudo handle, so we don't know what the | |
@@ -1747,13 +1748,8 @@ gboolean GetExitCodeProcess (gpointer process, guint32 *code) | |
/* Make sure any process exit has been noticed, before | |
* checking if the process is signalled. Fixes bug 325463. | |
*/ | |
- process_wait (process, 0); | |
- | |
- if (_wapi_handle_issignalled (process) == TRUE) { | |
+ if (WAIT_OBJECT_0 == process_wait (process, 0) && _wapi_handle_issignalled (process) == TRUE) | |
*code = process_handle->exitstatus; | |
- } else { | |
- *code = STILL_ACTIVE; | |
- } | |
return(TRUE); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment