[System] Process.WaitForExit now triggers event Exited.
authorMarcos Henrich <marcos.henrich@xamarin.com>
Wed, 8 Apr 2015 13:44:09 +0000 (14:44 +0100)
committerMarcos Henrich <marcos.henrich@xamarin.com>
Wed, 8 Apr 2015 13:44:09 +0000 (14:44 +0100)
mcs/class/System/System.Diagnostics/Process.cs

index d65247fc4d84ebb265e39a7a0291b0606c0e3641..2910f943c5e1a04be83b417ffe9ff0bc000d8801 100644 (file)
@@ -1256,7 +1256,13 @@ namespace System.Diagnostics {
                                                return false;
                                }
                        }
-                       return WaitForExit_internal (process_handle, ms);
+
+                       bool exited = WaitForExit_internal (process_handle, ms);
+
+                       if (exited)
+                               OnExited ();
+
+                       return exited;
                }
 
                /* Waits up to ms milliseconds for process 'handle' to