title: IPC mechanisms for python
body: <p>A and B are two python programs in the same directory. Currently program A is running and now program B is going to be executed from A by using the following instruction. </p>
  
  <pre><code>os.system("python B.py &amp; echi $!")
  </code></pre>
  
  <p>'A' has to execute 'B' for more than 100 times, but sometimes B will hang in between, so at that time I couldn't able to continue the whole operation. Now I want a IPC mechanism to find whether 'B' got struck, If it is strucked then I can kill that process automatically and start again. </p>
  
  <p>NOTE: I don't want to use mmap,files, pickle</p>