[Mono-bugs] [Bug 401225] New: Process.StandardOutput is buffering process output
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Jun 18 06:51:13 EDT 2008
https://bugzilla.novell.com/show_bug.cgi?id=401225
Summary: Process.StandardOutput is buffering process output
Product: Mono: Class Libraries
Version: SVN
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: System
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: lluis at novell.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Try the following test case:
using System;
using System.Diagnostics;
public class Test
{
public static void Main (string[] args)
{
if (args.Length == 0) {
Process proc = new Process ();
proc.StartInfo.FileName = "mono";
proc.StartInfo.Arguments =
typeof(Test).Assembly.Location + " x";
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.RedirectStandardInput = true;
proc.StartInfo.RedirectStandardOutput = true;
proc.Start ();
// This call should read the whole line, but it is
blocking in the middle
proc.StandardOutput.ReadLine ();
}
else {
Console.WriteLine (new string ('h', 10000));
Console.ReadLine ();
}
}
}
In this example one process reads tries to read a line of text from the output
of another process. The line is fully written by the other process, but the
main process is blocked waiting for a buffer to fill, and it never exits.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list