Catch SIGINT, and clean-up semaphores