title: write error: Broken pipe
body: <p>I have to run a tool on around 300 directories. Each run take around 1 minute to 30 minute or even more than that. So, I wrote a python script having a loop to run the tool on all directories one after another.</p>
  
  <p>my python script has code something like:</p>
  
  <pre><code>for directory in directories:
    os.popen('runtool_exec ' + directory)
  </code></pre>
  
  <p>But when I run the python script I get the following error messages repeatedly:</p>
  
  <pre><code>..
  tail: write error: Broken pipe
  date: write error: Broken pipe
  ..
  </code></pre>
  
  <p>All I do is login on a remote server using ssh where the tool, python script, and subject directories are kept. When I individually run the tool from command prompt using command like:</p>
  
  <pre><code>runtool_exec directory
  </code></pre>
  
  <p>it works fine. "broken pipe" error is coming only when I run using the python script.
  Any idea, workaround?</p>