title: Python subprocess.run timeout behaving differently on Windows vs Linux
body: <p>The following snippet of code, running on <code>python 3.6.8</code> seem to behave very differently on Windows vs Linux</p>
  <pre class="lang-py prettyprint-override"><code>from subprocess import run, PIPE
  from concurrent.futures import ThreadPoolExecutor
  from datetime import datetime as dt
  import threading
  
  def run_command(sleep, timeout):
      try:
          command = f&quot;ping 127.0.0.1 -n {sleep + 1}&quot;
          print(f&quot;{dt.now()} - {threading.get_ident()} - {command}&quot;)
          out = run(command, timeout=timeout, stdout=PIPE, universal_newlines=True, shell=True)
          print(out)
      except Exception as e:
          print(f&quot;{dt.now()} - {threading.get_ident()} - &quot;, e)
  
  if __name__ ==  &quot;__main__&quot;:
      with ThreadPoolExecutor(max_workers=2) as e:
          e.submit(run_command, 10, 1)
          e.submit(run_command, 10, 5)
  </code></pre>
  <p>I am expecting to get Linux behavior all the time, which is to print:</p>
  <pre><code>2021-03-04 15:15:40.276109 - 140510989964864 - ping 127.0.0.1 -n 11
  2021-03-04 15:15:40.276998 - 140510981572160 - ping 127.0.0.1 -n 11
  2021-03-04 15:15:41.279731 - 140510989964864 -  Command 'ping 127.0.0.1 -n 11' timed out after 1 seconds
  2021-03-04 15:15:45.284004 - 140510981572160 -  Command 'ping 127.0.0.1 -n 11' timed out after 5 seconds
  </code></pre>
  <p>But when I run on Windows, it seems that both <code>subprocess.run</code> timeout &quot;together&quot;, note the timings for the timeout. I don't know if the issue could be on the ThreadPoolExecutor as well</p>
  <pre><code>2021-03-04 15:14:49.671291 - 376104 - ping 127.0.0.1 -n 11
  2021-03-04 15:14:49.671291 - 366200 - ping 127.0.0.1 -n 11
  2021-03-04 15:15:00.179961 - 376104 -  Command 'ping 127.0.0.1 -n 11' timed out after 1 seconds
  2021-03-04 15:15:00.179961 - 366200 -  Command 'ping 127.0.0.1 -n 11' timed out after 5 seconds
  </code></pre>
  <p>What do I have to do to get the same behavior when running this from Windows?</p>