title: WinError 6: The handle is invalid from python check_output spawn in Electron app
body: <p>I have an Electron app <code>xxx.exe</code> which is spawning an executable created from PyInstaller <code>yyy.exe</code>. In, <code>yyy.exe</code>, I am finally trying to launch a <code>git</code> cmd via <code>subprocess.check_output()</code>.
  Sadly, the call to <code>check_output()</code> throws <code>[WinError 6] The handle is invalid</code>.</p>
  
  <p>If <code>yyy.exe</code> is directly launched on the command line, everything is running fine.
  The issue is only happening on Windows. My assumption is that there are some checks on <code>stdin</code> that trigger the exception because running through an Electron app doesn't provide any Stdin.</p>
  
  <p>Any hints would be appreciated! Thanks in advance!</p>