Answers like this one say SIGKILL
is bad:
I just found out, if i send a sig kill or sig term to my program, ONLY GCNO FILES ARE MADE, no gcda files.
However, my app runs under the ROS framework, and the only way to terminate it is with a Control-C
. It can be trapped under most circumstances, but the framework also helps the process along with SIGKILL
s, so some programs within my suite get terminated before they get a chance to save their data.
So, is there some API that I could call every 10 seconds or so to flush the counters to disk?