Capture (trap) SIGINT (i.e., control-C), SIGTERM, and SIGKILL and kill -9 the whole process group.