Handle KeyboardInterrupt in server.