more corrections
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Robin Müller 2021-07-29 18:33:15 +02:00
parent 940d4965bc
commit d8acf94a02
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
2 changed files with 5 additions and 1 deletions

View File

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

View File

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