Skip to content

Commit d01ef2d

Browse files
authored
Merge pull request #284 from sy-c/master
v2.26.2
2 parents 6f05b88 + 67edf36 commit d01ef2d

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

doc/releaseNotes.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,3 +642,6 @@ This file describes the main feature changes for each readout.exe released versi
642642

643643
## v2.26.1 - 20/08/2024
644644
- Fixed missing details in "invalid RDH" log messages.
645+
646+
## v2.26.2 - 18/10/2024
647+
- Fixed spurious fatal log message when stopping a readout process by system signal (when running outside of ECS control, e.g. CTP readout server).

src/ReadoutVersion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12-
#define READOUT_VERSION "2.26.1"
12+
#define READOUT_VERSION "2.26.2"
1313

src/mainReadout.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ class Readout
317317
}
318318

319319
// Wrapper function to catch exception and report fatal errors
320-
int executeFunction(std::string actionName, std::function<int()> f) {
320+
int executeFunction(std::string actionName, std::function<int()> f, int plusZeroIsFatal = 1, int minusZeroIsFatal = 1) {
321321
// theLog.log(LogDebugDevel, "Calling function for %s",actionName.c_str());
322322
int err = -1;
323323
try {
@@ -326,7 +326,7 @@ class Readout
326326
catch (const std::exception& e) {
327327
theLog.log(LogErrorSupport_(3245), "Exception : %s", e.what());
328328
}
329-
if (err) {
329+
if ( ((err<0)&&(minusZeroIsFatal)) || ((err>0)&&(plusZeroIsFatal)) ) {
330330
std::vector<std::string> m;
331331
theLog.historyGetSummary(m);
332332
std::string reason = "Readout failed in " + actionName + ". Please check previous messages.";
@@ -355,7 +355,7 @@ class Readout
355355
return executeFunction("STOP", std::bind(&Readout::_stop, this));
356356
}
357357
int iterateRunning() {
358-
return executeFunction("RUNNING", std::bind(&Readout::_iterateRunning, this));
358+
return executeFunction("RUNNING", std::bind(&Readout::_iterateRunning, this), 0, 1); // special handling of positive error code: not fatal
359359
}
360360
int iterateCheck() {
361361
return executeFunction("CHECK", std::bind(&Readout::_iterateCheck, this));

0 commit comments

Comments
 (0)