From 9f73f661012462f36c2268c2e013ce6522c53c5a Mon Sep 17 00:00:00 2001 From: Neil Weisenfeld Date: Tue, 27 Aug 2024 10:17:24 -0400 Subject: [PATCH] Fix SIGHUP treatment to loop/restart as intended There's a do...while(m_signal==1) intended to allow a SIGHUP (1) to cause a restart, rather than an exit. But the current code doesn't reset m_killed, so it does instantiate a new DMRGateway object, but immediately exits. --- DMRGateway.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/DMRGateway.cpp b/DMRGateway.cpp index c9f984f..ff86107 100644 --- a/DMRGateway.cpp +++ b/DMRGateway.cpp @@ -101,6 +101,7 @@ int main(int argc, char** argv) do { m_signal = 0; + m_killed = false; // restart, don't exit, if looping from SIGHUP (1) CDMRGateway* host = new CDMRGateway(std::string(iniFile)); ret = host->run();