title: Why would C# ProcessStartInfoRedirectStandardOutput cause xcopy process to fail
body: <p>This is a bit of a pain because I now don't have the code in front of me, but I'll try to explain.</p>
  
  <p>I have a simple C# application that kicks off a Ruby script (it does a couple of other things, so it generates a batch file and executes that).</p>
  
  <p>I am using the C# process object and I set the following
  redirectstandardoutput = true
  redirectstandarderror = true
  UseShellExecute = false
  CreateNoWindow = true (lovely bit of backwards logic there!)</p>
  
  <p>I then create two threads and poll ReadLine() for both the error and output streams, waiting for them both to finish before I call WaitForExit().</p>
  
  <p>Now, no matter what I do my Ruby script fails to call a system("xcopy...") command when I redirect the output (no errors are generated it just doesn't copy).  It also doesn't copy other files I ask it to copy.</p>
  
  <p>This happens if I direct both streams to a thread, one of them, only redirect one of them and just call ReadToEnd().</p>
  
  <p>It only works correctly if I set redirectstandardoutput and redirectstandarderror to false.</p>
  
  <p>I'm at a total loss here.  I thought maybe the output stream was being filled up, but I can't imagine why if I'm calling ReadLine (I need read line so I can parse each line and only present relevant ones to the end user).  I also thought maybe calling dos commands from a threaded C# process might cause problems.</p>
  
  <p>Does anyone have any idea what might be going on here?  I should say I'm on VS .net 2005, which I think is the .Net Framework 2.0.</p>