title: Starting a process in console
body: <p>I am referring to this question:
  <a href="https://stackoverflow.com/questions/3633796/start-a-process-in-the-same-console">Start a process in the same console</a></p>
  
  <p>I am working in unity3d and trying to receive the projects list from eclim in the following way:</p>
  
  <pre><code>public static Process shell()
  { 
  var pr = new Process();
  pr.StartInfo = new ProcessStartInfo("\"C:/Program Files/eclipse_kepler/eclipse/eclim\"", "--nailgun-port 9091 -command projects"){
          UseShellExecute = false,
          RedirectStandardOutput = true,
          RedirectStandardInput = true,
          RedirectStandardError = true    
      };
  UnityEngine.Debug.Log("attempting start with: "+pr.StartInfo.FileName +" "+ pr.StartInfo.Arguments);
  //unfortunately my program breaks after the following line with System.ComponentMode.Win32Exception
  pr.Start();
  //never reaches the next lines
  var proutput = pr.StandardOutput.ReadToEnd();
  var prerror=pr.StandardError.ReadToEnd();
  UnityEngine.Debug.Log("eror was: "+prerror);
  UnityEngine.Debug.Log("output is: "+proutput);
  return pr;
  </code></pre>
  
  <p>I also tried doing the following thing:</p>
  
  <pre><code> public static Process shell()
  { 
  var pr = new Process();
  pr.StartInfo = new ProcessStartInfo(@"c:\windows\system32\netstat.exe", "-n"){
          UseShellExecute = false,
          RedirectStandardOutput = true,
          RedirectStandardInput = true,
          RedirectStandardError = true    
      };
  UnityEngine.Debug.Log("attempting start with: "+pr.StartInfo.FileName +" "+ pr.StartInfo.Arguments);
  //No Exception here and 
  pr.Start();
  //output works just fine
  var proutput = pr.StandardOutput.ReadToEnd();
  UnityEngine.Debug.Log("output is: "+proutput);
  pr.WaitForExit();
  return pr;
  </code></pre>
  
  <p>What confuses me most, is the fact that if I type in the console command manually, I am getting the correct output...
  <img src="https://i.stack.imgur.com/yF4KG.jpg" alt="Manual Console"></p>
  
  <p>I would be very thankful for any reasonable explanation or solution.</p>