Change subproc sigint handler to exit more cleanly
Review Request #2024 - Created April 3, 2015 and submitted
The very fast exit of os._exit can cause the stdlib multiproc glue code in the parent process, specifically the queues readers that shuttle results between processes, to deadlock.
It appears that using
sys.exitin subprocesses instead allows those queues to close in a way that does not cause the parent process to deadlock, while still ensuring that subprocesses exit.
As a refresher: Even if the work function passed to subprocs catches KeyboardInterrupt, the multiprocessing queue code still throws, so a signal handler of some kind is needed to prevent $numproc stacktraces being printed on interrupt.