title: Python multiprocessing: how to exit cleanly after an error?
body: <p>I am writing some code that makes use of the <code>multiprocessing</code> module. However, since I am a newbie, what often happens is that some error pops up, putting a halt to the main application.</p>
  
  <p>However, that applications' children still remain running, and I get a long, long list of running <code>pythonw</code> processes in my task manager list.</p>
  
  <p>After an error occurs, what can I do to make sure all the child processes are killed as well?</p>