From 30b0ffc7c9f6d943d9aee72cd8c53db46babfa9c Mon Sep 17 00:00:00 2001 From: Naoki-Hiraoka Date: Fri, 24 Mar 2023 19:14:05 +0900 Subject: [PATCH] [RobotHardware] call close_iob() on SIGINT --- rtc/RobotHardware/RobotHardware.cpp | 3 +-- rtc/RobotHardware/RobotHardware.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/rtc/RobotHardware/RobotHardware.cpp b/rtc/RobotHardware/RobotHardware.cpp index 51abd91a656..e4e921ffade 100644 --- a/rtc/RobotHardware/RobotHardware.cpp +++ b/rtc/RobotHardware/RobotHardware.cpp @@ -194,12 +194,11 @@ RTC::ReturnCode_t RobotHardware::onInitialize() } -/* RTC::ReturnCode_t RobotHardware::onFinalize() { + delete m_robot.get(); // to call close_iob() in destructor of robot return RTC::RTC_OK; } -*/ /* RTC::ReturnCode_t RobotHardware::onStartup(RTC::UniqueId ec_id) diff --git a/rtc/RobotHardware/RobotHardware.h b/rtc/RobotHardware/RobotHardware.h index 1450cfd07c8..d54328ed415 100644 --- a/rtc/RobotHardware/RobotHardware.h +++ b/rtc/RobotHardware/RobotHardware.h @@ -62,7 +62,7 @@ class RobotHardware // The finalize action (on ALIVE->END transition) // formaer rtc_exiting_entry() - // virtual RTC::ReturnCode_t onFinalize(); + virtual RTC::ReturnCode_t onFinalize(); // The startup action when ExecutionContext startup // former rtc_starting_entry()