On Thu, 05 Apr 2007 17:10:33 -0700, Jon Davis
<jon@REMOVE.ME.PLEASE.jondavis.net> wrote:
> StandardError was commented out, to avoid that exact scenario.
Not in the second example you gave.
In any case, you don't have a sample that anyone else can use to try to
reproduce your problem, so it's not possible for anyone to look directly
at what's going on. In your first example, you use ReadLine which will
block until there's a line to be read. Maybe that line never comes. In
your second example, you use ReadToEnd which cannot complete if the child
process gets blocked itself. Since RedirectStandardError isn't commented
out, it's entirely possible that's your deadlock there.
Absent a minimal-but-complete sample of code that reliably reproduces the
problem, there may not be any better advice you can get. The best method
IMHO would be to run both processes under a debugger and just look to see
what they are waiting on when things appear to hang. However, I still
can't figure out how to get VS2005's debugger to allow me to debug threads
the way previous versions did, so I'm a bit hesitant to suggest that,
since it might not be as useful advice as it initially seems.
Pete