| 64 | |
| 65 | #if defined (__unix__) || (defined (__APPLE__) && defined (__MACH__)) || defined (_WIN32) |
| 66 | static void sigint_handler(int signo) { |
| 67 | if (signo == SIGINT) { |
| 68 | if (!is_interacting && g_params->interactive) { |
| 69 | is_interacting = true; |
| 70 | need_insert_eot = true; |
| 71 | } else { |
| 72 | console::cleanup(); |
| 73 | LOG("\n"); |
| 74 | common_perf_print(*g_ctx, *g_smpl); |
| 75 | |
| 76 | // make sure all logs are flushed |
| 77 | LOG("Interrupted by user\n"); |
| 78 | common_log_pause(common_log_main()); |
| 79 | |
| 80 | _exit(130); |
| 81 | } |
| 82 | } |
| 83 | } |
| 84 | #endif |
| 85 | |
| 86 | int main(int argc, char ** argv) { |
no test coverage detected