[Mono-bugs] [Bug 74810][Nor] Changed - hang in Process.StandardOutput.ReadToEnd

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 5 May 2005 11:23:57 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by james@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=74810

--- shadow/74810	2005-05-05 04:02:20.000000000 -0400
+++ shadow/74810.tmp.27782	2005-05-05 11:23:57.000000000 -0400
@@ -46,6 +46,22 @@
 information like:
 1. What's the sequence of calls you're doing? Ie, what do you do with
 Process and ProcessStartInfo after calling Start.
 2. How big is the output expected to be?
 3. What program are you running?
 4. Does the program exit when you run it from the command line?
+
+------- Additional Comments From james@ximian.com  2005-05-05 11:23 -------
+Process proc = new Process ();
+proc.StartInfo.UseShellExecute = false;
+proc.StartInfo.RedirectStandardOutput = true;
+proc.StartInfo.FileName = "/bin/df";
+proc.StartInfo.Arguments = "-TPl --block-size=1";
+
+proc.Start ();
+string output = proc.StandardOutput.ReadToEnd ();
+proc.WaitForExit ();
+proc.Close ();
+
+
+When I was seeing it hang, the output was around 316 bytes.  And yes,
+'df' exits when running from the command line.