Originally Posted By: peter
This chap agrees with you: http://alabaxblog.info/2013/06/redirectstandardoutput-beginoutputreadline-pattern-broken/ sounds like a paper-bag bug in BeginOutputReadLine (as opposed to in the kernel). It's not totally clear to me how his Task Parallel-based solution makes the synchronous calls act like asynchronous ones, but it might work for you to put your "expect-like" behaviour in a version of his ReadStream callback.


A variant of this ended up being the correct solution. His code didn't work for me because it still got deadlocks where I didn't want them, so I had to modify it heavily. But basically I took his idea of using Task.Factory.StartNew to create a separate thread to use the synchronous Process.StandardOutput.Read() to do my own reader which did not lose any of the starting text from the program.

Thank you!
_________________________
Tony Fabris