The coverage data can't be saved when Users use Ctrl+C to stop the program. As when using 'coverage run <program>', it is in a process. Sometimes the program can't exit by itself, it needs signal input. When using Ctrl+C to stop, the finally clause won't be executed.
I am wondering whether we can register a function in atexit to stop/save coverage.