commit | author | age | ||
16b655 | 1 | #include "strat.hpp" |
0b7aa0 | 2 | #include <csignal> |
JG | 3 | #include <cstdlib> |
4 | #include <iostream> | |
16b655 | 5 | |
0b7aa0 | 6 | void signalHandler(int signum) |
JG | 7 | { |
0bef19 | 8 | strat::destroy(); |
JG | 9 | std::exit(0); |
0b7aa0 | 10 | } |
JG | 11 | |
0bef19 | 12 | void no(int signum) { std::cout << "no." << std::endl; } |
0b7aa0 | 13 | |
JG | 14 | int main(void) |
15 | { | |
0bef19 | 16 | signal(SIGINT, signalHandler); |
JG | 17 | // signal(SIGTERM, no); |
18 | strat::initialise(); | |
19 | strat::mainLoop(); | |
0b7aa0 | 20 | } |