Added OBSW Watchdog #67

Merged
meierj merged 20 commits from mueller/added-watchdog into develop 2021-07-31 08:51:56 +02:00
2 changed files with 5 additions and 1 deletions
Showing only changes of commit d8acf94a02 - Show all commits

View File

@ -45,6 +45,7 @@ int WatchdogTask::performOperation() {
if(fd < 0) {
std::cerr << "eive-watchdog: Opening pipe " << watchdog::FIFO_NAME <<
"read-only failed with " << errno << ": " << strerror(errno) << std::endl;
return -1;
}
state = States::RUNNING;

View File

@ -10,7 +10,10 @@ int main() {
std::cout << "eive-watchdog: Starting OBSW watchdog.." << std::endl;
try {
WatchdogTask watchdogTask;
watchdogTask.performOperation();
int result = watchdogTask.performOperation();
if(result != 0) {
return result;
}
}
catch(const std::runtime_error& e) {
std::cerr << "eive-watchdog: Run time exception " << e.what() << std::endl;