From 8886855396460a861155b5ff1361d48a2e717fbe Mon Sep 17 00:00:00 2001 From: Drath Date: Mon, 22 Dec 2025 14:37:26 +0100 Subject: [PATCH] refactor --- main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.cpp b/main.cpp index 8812a7d..5bbe74b 100644 --- a/main.cpp +++ b/main.cpp @@ -42,7 +42,7 @@ struct Sensors { std::mutex mtx; // making sure the struct isnt accessed by multiple threads at once }; -void sighandler(int) { +void signalHandler(int) { log(LOG::WRN, "got SIGINT/SIGTERM, exiting..."); sem::main.release(); sem::display.release(); @@ -166,8 +166,8 @@ void displayThread(std::stop_token st, Sensors* s) { int main() { log(LOG::START, "============================= PROGRAM START ============================="); // to make logs clearer - std::signal(SIGINT, sighandler); - std::signal(SIGTERM, sighandler); + std::signal(SIGINT, signalHandler); + std::signal(SIGTERM, signalHandler); { std::unique_ptr pSensors = std::make_unique();