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();