"John L. Stephens" <lists.jksteph...@gmail.com> writes: > As the parent process terminates 'normally' (either through normal > termination or SIGINT termination), mulitprocessing steps in and > performs child process cleanup via the x.terminate() method. If the > parent terminates any other way, multiprocessing doesn't have the > opportunity to cleanup.
Unless you handle the signal explicitly? Since SIGINT maps to KeyboardInterrupt automatically, you basically handle SIGINT but nothing else. A rude hack to your example with a handler for SIGTERM which just raises KeyboardInterrupt resulted in the children getting the SIGTERM 10 seconds afterwards. Which is after the sleep(10) call finishes in your script. -- http://mail.python.org/mailman/listinfo/python-list