Unix/Linux/macOS handler
| 420 | #else |
| 421 | // Unix/Linux/macOS handler |
| 422 | void signal_handler(int signal) { |
| 423 | if (signal == SIGINT) { |
| 424 | g_terminate_flag.store(true); |
| 425 | cout << "\nCtrl+C detected, cleaning up and closing the program..." << endl; |
| 426 | } |
| 427 | } |
| 428 | #endif |
| 429 | |
| 430 | // Setup the interrupt handler based on platform |