P
PIEBALD
I have a Process, I redirect the input, output, and error streams (and set
UseShellExecute = false ).
I can write with process.StandardInput.BaseStream.Write
I can read with process.StandardOutput.BaseStream.Read and receive 0 when
there is no data
But when I try to read with process.StandardError.BaseStream.Read (or
ReadByte) it blocks (or hangs?)
I expect to receive 0 (or -1) when there are no bytes to read.
Why do the two streams behave differently?
(Don't tell me to use BeginRead; that wouldn't answer my question.)
UseShellExecute = false ).
I can write with process.StandardInput.BaseStream.Write
I can read with process.StandardOutput.BaseStream.Read and receive 0 when
there is no data
But when I try to read with process.StandardError.BaseStream.Read (or
ReadByte) it blocks (or hangs?)
I expect to receive 0 (or -1) when there are no bytes to read.
Why do the two streams behave differently?
(Don't tell me to use BeginRead; that wouldn't answer my question.)