Catch keyboard interrupt and join threads.