Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnome.org>2008-12-25 20:44:52 +0300
committerMiguel de Icaza <miguel@gnome.org>2008-12-25 20:44:52 +0300
commit17550032752a48dcb3f292b4894bbaa1da96b4a9 (patch)
tree6f8ca15c2ef29388f857dc3b2b9335dad1d12636 /mcs/class/System/System.Diagnostics/Process.cs
parenta3e3e7976cb999c83b1f0271b2047ecac83cfc10 (diff)
A bug fix for 459450
2008-12-25 Miguel de Icaza <miguel@novell.com> * ProcessTest.cs: Created a test case from bug 459450. 2008-12-25 Leszek Ciesielski <skolima@gmail.com> * System.Diagnostics/Process.cs: Raise the Process.OutputDataReceived and Process.ErrorDataReceived with null arguments at the end. This is the documented behavior: http://msdn.microsoft.com/en-us/library/system.diagnostics.datareceivedeventargs.data.aspx And CruiseControl.NET depended on this. Bug #459450. * Microsoft.CSharp/CSharpCodeCompiler.cs: Fix the code, as it depened on the previous broken behavior. svn path=/trunk/mcs/; revision=122125
Diffstat (limited to 'mcs/class/System/System.Diagnostics/Process.cs')
-rw-r--r--mcs/class/System/System.Diagnostics/Process.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/mcs/class/System/System.Diagnostics/Process.cs b/mcs/class/System/System.Diagnostics/Process.cs
index aed5bf929a1..d2d510c1c08 100644
--- a/mcs/class/System/System.Diagnostics/Process.cs
+++ b/mcs/class/System/System.Diagnostics/Process.cs
@@ -1403,7 +1403,7 @@ namespace System.Diagnostics {
completed = true;
if (wait_handle != null)
wait_handle.Set ();
- Flush (true);
+ FlushLast ();
return;
}
@@ -1421,6 +1421,16 @@ namespace System.Diagnostics {
}
}
+ void FlushLast ()
+ {
+ Flush (true);
+ if (err_out) {
+ process.OnOutputDataReceived (null);
+ } else {
+ process.OnErrorDataReceived (null);
+ }
+ }
+
void Flush (bool last)
{
if (sb.Length == 0 ||