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