From 441abf1e6a15a39f1ef7bf5e4ee2a4a43bff327b Mon Sep 17 00:00:00 2001
From: Joel Grunbaum <joelgrun@gmail.com>
Date: Thu, 20 Jan 2022 05:18:00 +0000
Subject: [PATCH] Added names and ready notice
---
bot.cpp | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/bot.cpp b/bot.cpp
index 3e80bf5..9792a39 100644
--- a/bot.cpp
+++ b/bot.cpp
@@ -1,6 +1,20 @@
#include "strat.hpp"
+#include <csignal>
+#include <cstdlib>
+#include <iostream>
+
+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.10.0