diff --git a/doc/releaseNotes.md b/doc/releaseNotes.md index 60402c3..10aa861 100644 --- a/doc/releaseNotes.md +++ b/doc/releaseNotes.md @@ -642,3 +642,6 @@ This file describes the main feature changes for each readout.exe released versi ## v2.26.1 - 20/08/2024 - Fixed missing details in "invalid RDH" log messages. + +## v2.26.2 - 18/10/2024 +- Fixed spurious fatal log message when stopping a readout process by system signal (when running outside of ECS control, e.g. CTP readout server). diff --git a/src/ReadoutVersion.h b/src/ReadoutVersion.h index 1e035ba..5c2909b 100644 --- a/src/ReadoutVersion.h +++ b/src/ReadoutVersion.h @@ -9,5 +9,5 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -#define READOUT_VERSION "2.26.1" +#define READOUT_VERSION "2.26.2" diff --git a/src/mainReadout.cxx b/src/mainReadout.cxx index 97eb794..374e787 100644 --- a/src/mainReadout.cxx +++ b/src/mainReadout.cxx @@ -317,7 +317,7 @@ class Readout } // Wrapper function to catch exception and report fatal errors - int executeFunction(std::string actionName, std::function f) { + int executeFunction(std::string actionName, std::function f, int plusZeroIsFatal = 1, int minusZeroIsFatal = 1) { // theLog.log(LogDebugDevel, "Calling function for %s",actionName.c_str()); int err = -1; try { @@ -326,7 +326,7 @@ class Readout catch (const std::exception& e) { theLog.log(LogErrorSupport_(3245), "Exception : %s", e.what()); } - if (err) { + if ( ((err<0)&&(minusZeroIsFatal)) || ((err>0)&&(plusZeroIsFatal)) ) { std::vector m; theLog.historyGetSummary(m); std::string reason = "Readout failed in " + actionName + ". Please check previous messages."; @@ -355,7 +355,7 @@ class Readout return executeFunction("STOP", std::bind(&Readout::_stop, this)); } int iterateRunning() { - return executeFunction("RUNNING", std::bind(&Readout::_iterateRunning, this)); + return executeFunction("RUNNING", std::bind(&Readout::_iterateRunning, this), 0, 1); // special handling of positive error code: not fatal } int iterateCheck() { return executeFunction("CHECK", std::bind(&Readout::_iterateCheck, this));