diff options
author | Ludovic Henry <ludovic@xamarin.com> | 2015-10-07 21:38:37 +0300 |
---|---|---|
committer | Ludovic Henry <ludovic@xamarin.com> | 2015-10-07 21:40:17 +0300 |
commit | 0205c40d9b03d2d54fe303559337c130e70608dd (patch) | |
tree | d2b1f1cc21daa1fb9816dd6e5f896d26744f95f4 /mcs/class/System/System.Diagnostics/Process.cs | |
parent | e3062c86b863196db8fdd7aea3da0b8069432777 (diff) |
[test] The process output/error is finished only when null is passed
Diffstat (limited to 'mcs/class/System/System.Diagnostics/Process.cs')
-rw-r--r-- | mcs/class/System/System.Diagnostics/Process.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mcs/class/System/System.Diagnostics/Process.cs b/mcs/class/System/System.Diagnostics/Process.cs index 5ab69b4f6d4..c15367c9c9f 100644 --- a/mcs/class/System/System.Diagnostics/Process.cs +++ b/mcs/class/System/System.Diagnostics/Process.cs @@ -1348,7 +1348,6 @@ namespace System.Diagnostics { [StructLayout (LayoutKind.Sequential)] sealed class ProcessAsyncReader : IOAsyncResult { - // These fields are not in SocketAsyncResult Process process; IntPtr handle; Stream stream; @@ -1368,10 +1367,10 @@ namespace System.Diagnostics { public void BeginRead () { - IOSelector.Add (this.handle, new IOSelectorJob (IOOperation.Read, s => AddInput ((ProcessAsyncReader) s), this)); + IOSelector.Add (this.handle, new IOSelectorJob (IOOperation.Read, _ => AddInput (), null)); } - public void AddInput (ProcessAsyncReader reader) + public void AddInput () { lock (this) { int nread = stream.Read (buffer, 0, buffer.Length); @@ -1398,7 +1397,7 @@ namespace System.Diagnostics { Flush (false); - IOSelector.Add (this.handle, new IOSelectorJob (IOOperation.Read, s => AddInput ((ProcessAsyncReader) s), this)); + IOSelector.Add (this.handle, new IOSelectorJob (IOOperation.Read, _ => AddInput (), null)); } } @@ -1432,7 +1431,8 @@ namespace System.Diagnostics { } } - public void Close () { + public void Close () + { IOSelector.Remove (handle); stream.Close (); } |