title: C# child process goes idle after sometime
body: <p>I have a windows client for a data monitoring application written in C#. And I have a python script compiled with <a href="https://www.pyinstaller.org/" rel="nofollow noreferrer">Pyinstaller</a> that keeps sending data to the client every few seconds.</p>
  
  <p>When I manually run the python application ( by double-clicking it ), it runs perfectly ( keeps sending the data continuously ), however, when I start the application in C#, it stops sending the data after 2-3 minutes.</p>
  
  <p><em>I read about <code>ironpython</code> but thought of doing it the old way as the script had a few dependencies.</em> </p>
  
  <p>This is the code I'm using to spawn the python process:</p>
  
  <pre><code>Process process = new Process();
  process.StartInfo.RedirectStandardOutput = true;
  process.StartInfo.UseShellExecute = false;
  process.StartInfo.CreateNoWindow = true;
  process.StartInfo.FileName = "relative-path-to-exe";
  process.Start();
  </code></pre>
  
  <p>I've even tried to set the process priority to <code>High/Realtime</code> using the following code, but it didn't help:</p>
  
  <pre><code>process.PriorityClass = ProcessPriorityClass.RealTime;
  </code></pre>
  
  <p>Any idea what might be causing this issue ?</p>