title: kill subprocesses using bash script
body: <p>I want to run a python program 1000 times. If successful it returns output in about 90 seconds, else continue to run may be for 4 hours.
  I want to run a bash script that will run the python program in a loop in such a way that it waits 100 seconds for the script to terminate successfully else kill it.</p>
  
  <p>It must not kill the next instance of the program which may become successful. </p>
  
  <p>I am working in Ubuntu 12.04 lts. </p>
  
  <pre><code>for i in {1..1000..1}
  do
      ./myprocess.py
      sleep 100
  done
  
  #And then what........?
  </code></pre>
  
  <p>Please help</p>