| 49 | |
| 50 | #if defined (__unix__) || (defined (__APPLE__) && defined (__MACH__)) || defined (_WIN32) |
| 51 | static void sigint_handler(int signo) { |
| 52 | if (signo == SIGINT) { |
| 53 | if (g_is_generating) { |
| 54 | g_is_generating = false; |
| 55 | } else { |
| 56 | console::cleanup(); |
| 57 | if (g_is_interrupted) { |
| 58 | _exit(1); |
| 59 | } |
| 60 | g_is_interrupted = true; |
| 61 | } |
| 62 | } |
| 63 | } |
| 64 | #endif |
| 65 | |
| 66 | struct mtmd_cli_context { |