title: Stop a process when error occur in multiprocessing
body: <p>I have created a 3 process in python. I have attached a code.
  Now I want to stop the execution of running p2,p3 process because I got an error due to p1 process.I have idea to add p2.terminate(),I don't know where to add in this case. Thanks in advance.</p>
  <pre><code>def table(a):
       try:
          for i in range(100):
              print(i,'x',a,'=',a*i)
       except:
          print(&quot;error&quot;)
  
  processes = []
  p1= multiprocessing.Process(target = table,args=['s'])
  p2= multiprocessing.Process(target = table,args=[5])
  p3= multiprocessing.Process(target = table,args=[2])
  p1.start()
  p2.start()
  p3.start()
  
  processes.append(p1)
  processes.append(p2)
  processes.append(p3)
  
  for process in processes:
      process.join()```
  
  
  </code></pre>