[Mono-bugs] [Bug 401225] Process.StandardOutput is buffering process output

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Jun 18 12:41:36 EDT 2008


User dick at novell.com added comment

--- Comment #1 from Dick Porter <dick at novell.com>  2008-06-18 10:41:36 MDT ---
Created an attachment (id=222840)
 --> (https://bugzilla.novell.com/attachment.cgi?id=222840)
proposed patch

What I think is happening, is that StreamReader.ReadLine is only searching the
first 1024 chars for the newline, as that is the default buffer size.  The
FileStream is using 8192 bytes of buffer, so is reading the pipe in 8192 byte
chunks.  If the last chunk happens to arrive in a read > 1024 the StreamReader
tries to read again, which obviously blocks forever waiting for more data.  So
it's not buffering per se that is the problem, it's mismatched buffering
between two classes.

The proposed patch matches the StreamReader and FileStream buffer sizes, and
seems to work for me.

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