From 128c6d51ec8c70e230dc86b100cb887ba3f0378d Mon Sep 17 00:00:00 2001 From: Joel Grunbaum <joelgrun@gmail.com> Date: Thu, 20 Jan 2022 07:00:50 +0000 Subject: [PATCH] Secrets to macros and c string concat at compile time --- bot.cpp | 19 ++++++++++++++++++- 1 files changed, 18 insertions(+), 1 deletions(-) diff --git a/bot.cpp b/bot.cpp index 2b2d6f7..9792a39 100644 --- a/bot.cpp +++ b/bot.cpp @@ -1,3 +1,20 @@ #include "strat.hpp" +#include <csignal> +#include <cstdlib> +#include <iostream> -int main(void) {} +void signalHandler(int signum) +{ + strat::destroy(); + std::exit(0); +} + +void no(int signum) { std::cout << "no." << std::endl; } + +int main(void) +{ + signal(SIGINT, signalHandler); + // signal(SIGTERM, no); + strat::initialise(); + strat::mainLoop(); +} -- Gitblit v1.9.3