signal handling: send SIGINT (ctrl-C) to creg if you want it to stop optimizing after the current iteration completes