title: How could I get share directory in multiprocess when pressing ctrl+c
body: <p>I'm using the multiprocessing module to do parallel processing in my program, I Want to get the share dict object between multi-processes, I could do it when multi-process is closed normally, but could not get it when pressing CTRL+C, How could i achieve my goal ?
  my code as follows</p>
  
  <pre><code>#!/usr/bin/python
  from multiprocessing import Process, Manager, Pool
  import os
  import signal
  import time
  
  def init_worker():
      signal.signal(signal.SIGINT, signal.SIG_IGN)
  
  def run_worker(i,my_d):
      print 'Work Started: %d %d' % (os.getpid(), i)
      for j in range(5):
          print j
          tmp1 = str(i) + str(j)
          my_d[tmp1] = j
          time.sleep(1)
  
  def main():
      print "Initializng 3 workers"
      pool = Pool(3, init_worker)
  
      manager = Manager()
      my_d = manager.dict()
      try:
          for i in range(3):
              pool.apply_async(run_worker,args=(i,my_d))
          pool.close()
          pool.join()
          print my_d
  # When process is closed normally, I could get the my_d successfully
  
      except KeyboardInterrupt:
          print "Caught KeyboardInterrupt, terminating workers"
          pool.terminate()
          pool.join()
          print my_d
  #When process is closed by Ctrl+C, couldn't I get the my_d ?
  
  if __name__ == "__main__":
      main()
  </code></pre>