Author: gonzalo
Date: 2005-06-15 02:26:19 -0400 (Wed, 15 Jun 2005)
New Revision: 46013
Modified:
branches/mono-1-1-7/mono/mono/io-layer/ChangeLog
branches/mono-1-1-7/mono/mono/io-layer/processes.c
Log:
r45082 from HEAD. Fixes bug #75273
Modified: branches/mono-1-1-7/mono/mono/io-layer/ChangeLog
===================================================================
--- branches/mono-1-1-7/mono/mono/io-layer/ChangeLog 2005-06-15 05:59:02 UTC
(rev 46012)
+++ branches/mono-1-1-7/mono/mono/io-layer/ChangeLog 2005-06-15 06:26:19 UTC
(rev 46013)
@@ -1,3 +1,8 @@
+2005-05-26 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
+
+ * processes.c: make ExitCode be valid even if the user didn't call
+ WaitForExit() and is just polling on HasExited.
+
2005-05-17 Dick Porter <[EMAIL PROTECTED]>
* io.c (file_getfilesize): Clear the error value, so that files
Modified: branches/mono-1-1-7/mono/mono/io-layer/processes.c
===================================================================
--- branches/mono-1-1-7/mono/mono/io-layer/processes.c 2005-06-15 05:59:02 UTC
(rev 46012)
+++ branches/mono-1-1-7/mono/mono/io-layer/processes.c 2005-06-15 06:26:19 UTC
(rev 46013)
@@ -932,11 +932,13 @@
return(FALSE);
}
- /* A process handle is only signalled if the process has exited */
- if(_wapi_handle_issignalled (process)==TRUE) {
- *code=process_handle->exitstatus;
+ /* A process handle is only signalled if the process has exited
+ * and has been waited for */
+ if (_wapi_handle_issignalled (process) == TRUE ||
+ process_wait (process, 0) == WAIT_OBJECT_0) {
+ *code = process_handle->exitstatus;
} else {
- *code=STILL_ACTIVE;
+ *code = STILL_ACTIVE;
}
return(TRUE);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches