title: How can I terminate multiprocessing by itself
body: <p>Can I stop multiprocessing process by itself ?</p>
  
  <p>when I catch the exception , I want to terminate at exception area.(<code>doSomething function</code>)</p>
  
  <pre><code>import multiprocessing
  from threading import Timer
  
  class TTT(multiprocessing.Process):
      def __init__(self, name):
          # must call this before anything else
          multiprocessing.Process.__init__(self)
          self.daemon = True
  
      def run(self):
          while True:
              t = Timer(5, self.doSomething)
              t.start()
              t.join()
  
      def doSomething(self):
          try:
              raise Exception('a','b')
          except Exception as e:
              print(e)
              # I want to terminate process here~
  
  if __name__ == '__main__' :
      t = TTT('aaa')
      t.start()
      t.join()
  </code></pre>