Multiple calls of the process_died method occur when a node is launched with respawn set to true and a delay. · Issue #2385 · ros/ros_comm · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a node is going to be respawned after some delay following code (inside process monitor run method )will be executed after each spin until configured delay is reached:
forpinprocs:
try:
ifnotp.is_alive():
logger.debug("Process[%s] has died, respawn=%s, required=%s, exit_code=%s",
p.name,
"True(%f)"%p.respawn_delayifp.respawnelsep.respawn,
p.required, p.exit_code)
exit_code_str=p.get_exit_description()
ifp.required:
printerrlog('='*80+"REQUIRED process [%s] has died!\n%s\nInitiating shutdown!\n"%(p.name, exit_code_str)+'='*80)
self.is_shutdown=Trueelifnotpinrespawn:
ifp.exit_code:
printerrlog("[%s] %s"%(p.name, exit_code_str))
else:
printlog_bold("[%s] %s"%(p.name, exit_code_str))
dead.append(p)
## no need for lock as we require listeners be## added before process monitor is launchedforlinself.listeners:
l.process_died(p.name, p.exit_code)
As a result, the process_died method might be called multiple times. I know this is the end of life for ROS, so I am leaving this issue primarily for reference.
And potential fix:
forpinprocs:
try:
ifnotp.is_alive():
logger.debug("Process[%s] has died, respawn=%s, required=%s, exit_code=%s",
p.name,
"True(%f)"%p.respawn_delayifp.respawnelsep.respawn,
p.required, p.exit_code)
exit_code_str=p.get_exit_description()
ifp.required:
printerrlog('='*80+"REQUIRED process [%s] has died!\n%s\nInitiating shutdown!\n"%(p.name, exit_code_str)+'='*80)
self.is_shutdown=Trueelifnotpinrespawn:
ifp.exit_code:
printerrlog("[%s] %s"%(p.name, exit_code_str))
else:
printlog_bold("[%s] %s"%(p.name, exit_code_str))
dead.append(p)
## no need for lock as we require listeners be## added before process monitor is launchedifnotpinrespawn:
forlinself.listeners:
l.process_died(p.name, p.exit_code)
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
When a node is going to be respawned after some delay following code (inside process monitor run method )will be executed after each spin until configured delay is reached:
As a result, the process_died method might be called multiple times. I know this is the end of life for ROS, so I am leaving this issue primarily for reference.
And potential fix:
The text was updated successfully, but these errors were encountered: