add signal handler. not successful. may have to kill running
subprocesses too some other way.