title: In Python, how do I know when a process is finished?
body: <p>From within a Python GUI (PyGTK) I start a process (using multiprocessing).  The process takes a long time (~20 minutes) to finish.  When the process is finished I would like to clean it up (extract the results and join the process).  How do I know when the process has finished?</p>
  
  <p>My colleague suggested a busy loop within the parent process that checks if the child process has finished.  Surely there is a better way.</p>
  
  <p>In Unix, when a process is forked, <a href="http://users.actcom.co.il/~choo/lupg/tutorials/multi-process/multi-process.html#child_death_async" rel="noreferrer">a signal handler is called from within the parent process when the child process has finished</a>.  But I cannot see anything like that in Python.  Am I missing something?</p>
  
  <p>How is it that the end of a child process can be observed from within the parent process?  (Of course, I do not want to call Process.join() as it would freeze up the GUI interface.)</p>
  
  <p>This question is not limited to multi-processing: I have exactly the same problem with multi-threading.  </p>