title: How to restart a process using python multiprocessing module
body: <p>I am trying to restart a python process using multiprocessing module,  but "AssertionError: cannot start a process twice" appears.</p>
  
  <p>My question </p>
  
  <ul>
  <li>How can I restart the process</li>
  <li>Once its terminated  why it is going to zombie mod</li>
  <li>How can I remove the zombie process</li>
  </ul>
  
  <pre><code>import time
  from multiprocessing import Process
  
  def worker ():
      while True:
          print "Inside the worker"
          time.sleep(10)
  
  
  p1 = Process(target=worker,name="worker")
  p1.start()
  #p1.join()
  
  time.sleep(3)
  
  p1.terminate()
  print "after Termination "
  time.sleep(3)
  
  
  p1.start()
  
  
  </code></pre>
  
  <p>Actually I am trying to create a process monitor function to watch the memory and CPU usage of all processes . If it reach a certain level I want to restart on realtime</p>