| 154 | |
| 155 | static void termination_handler(int signum) ATTR_NORETURN; |
| 156 | static void termination_handler(int signum) { |
| 157 | (void) signum; |
| 158 | if (is_tracing) { |
| 159 | printf("Ctrl-C detected! Flushing trace and shutting down.\n\n"); |
| 160 | mtr_flush(); |
| 161 | fwrite("\n]}\n", 1, 4, f); |
| 162 | fclose(f); |
| 163 | } |
| 164 | exit(1); |
| 165 | } |
| 166 | |
| 167 | void mtr_register_sigint_handler() { |
| 168 | #ifndef MTR_ENABLED |
nothing calls this directly
no test coverage detected