[openrtm-commit:02145] r758 - trunk/OpenRTM-aist-Python/OpenRTM_aist

openrtm @ openrtm.org openrtm @ openrtm.org
2016年 11月 28日 (月) 13:28:59 JST


Author: miyamoto
Date: 2016-11-28 13:28:59 +0900 (Mon, 28 Nov 2016)
New Revision: 758

Modified:
   trunk/OpenRTM-aist-Python/OpenRTM_aist/ManagerServant.py
Log:
[compat,bugfix,->RELENG_1_2] fixed bug.

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/ManagerServant.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/ManagerServant.py	2016-11-25 10:39:37 UTC (rev 757)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/ManagerServant.py	2016-11-28 04:28:59 UTC (rev 758)
@@ -25,6 +25,15 @@
 import SDOPackage
 
 
+class terminate_Task(OpenRTM_aist.Task):
+  def __init__(self, mgr):
+    OpenRTM_aist.Task.__init__(self)
+    self._mgr = mgr
+  def svc(self):
+    time.sleep(1)
+    self._mgr.terminate()
+
+
 class ManagerServant(RTM__POA.Manager):
   """
   """
@@ -802,7 +811,8 @@
   #
   # ReturnCode_t shutdown()
   def shutdown(self):
-    self._mgr.terminate()
+    task = terminate_Task(self._mgr)
+    task.activate()
     return RTC.RTC_OK
 
   
@@ -1238,9 +1248,11 @@
       if not rtcd_cmd:
         rtcd_cmd = "rtcd_python"
 
+
       cmd = rtcd_cmd
-      cmd = " -p "
+      cmd += " -p "
       cmd += mgrvstr[1] # port number
+      cmd += " -d "
 
       self._rtcout.RTC_DEBUG("Invoking command: %s.", cmd)
       ret = OpenRTM_aist.launch_shell(cmd)



More information about the openrtm-commit mailing list