2008-07-27 Zoltan Varga <vargaz@gmail.com>
authorZoltan Varga <vargaz@gmail.com>
Sun, 27 Jul 2008 00:08:08 +0000 (00:08 -0000)
committerZoltan Varga <vargaz@gmail.com>
Sun, 27 Jul 2008 00:08:08 +0000 (00:08 -0000)
* Process.cs (SetExitCallbackIfNeeded): Avoid a race condition by not
checking for HashExited.

svn path=/trunk/mcs/; revision=108887

mcs/class/System/System.Diagnostics/ChangeLog
mcs/class/System/System.Diagnostics/Process.cs

index 07063148756edc13462d11fd6c2c4670d4b583aa..b3b0cebefe711eae9447a9110d83243604c7dee1 100644 (file)
@@ -1,3 +1,8 @@
+2008-07-27  Zoltan Varga  <vargaz@gmail.com>
+
+       * Process.cs (SetExitCallbackIfNeeded): Avoid a race condition by not
+       checking for HashExited.
+
 2008-06-27  Atsushi Enomoto  <atsushi@ximian.com>
 
        * DiagnosticsConfigurationHandler.cs: quick build fix (hopefully).
index 01bf816904861d2e41a47b56d8637385d1a6d5da..e56b567f0265e3dd14c2b0cd9ac9a4b392f63745 100644 (file)
@@ -106,7 +106,7 @@ namespace System.Diagnostics {
                {
 #if !NET_2_1
                        bool start = (!already_waiting && enableRaisingEvents && exited_event != null);
-                       if (start && process_handle != IntPtr.Zero && !HasExited) {
+                       if (start && process_handle != IntPtr.Zero) {
                                WaitOrTimerCallback cb = new WaitOrTimerCallback (CBOnExit);
                                ProcessWaitHandle h = new ProcessWaitHandle (process_handle);
                                ThreadPool.RegisterWaitForSingleObject (h, cb, this, -1, true);