gcc writes the runtime coverage data (the .gcda files) in an atenit() callback.
atenit()
If your process does not exit (say, runs forever), or crashes/is killed - then the callback is not called, and no data is written.