title: Why does a non-interactive batch script think I've pressed control-C?
body: <p>So my batch script is ticking along nicely when suddenly this appears in the output log:</p>
  
  <pre><code>21:27:13.99 c:\apps\w7lab-scripting&gt;some-command
  Error 3221225786
  ^CTerminate batch job (Y/N)? 
  </code></pre>
  
  <p>and the script stops dead.</p>
  
  <p>The batch script is running in session zero, so I know it didn't receive a real control-C, and none of my code calls <code>GenerateConsoleCtrlEvent</code> so that can't be it.  The only clue is that <code>some-command</code> was communicating with an interactive application at the time, and <em>that</em> application's console received a control-C.  The expected behaviour was for <code>some-command</code> to display the other application's exit code, then exit with the same code.  The batch script would have dealt with the error appropriately, if it hadn't stopped dead.</p>
  
  <p>What's going on here?</p>