Save state on SIGTERM, in addition to SIGINT.