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
The system test (#225) as well as manual tests revealed, that handling of SIGINT doesn't seem to work properly, yet.
That is, when using rclc_executor_spin() for example, code after rclc_executor_spin() (e.g. example_service_node.c#L81-L82) is not executed when program is aborted through SIGINT.
The current context check in rclc_executor_spin_some doesn't seem to do the trick.
One option is to expose this feature through an explicit rclc::ok(), similar to rclcpp::ok()
The text was updated successfully, but these errors were encountered:
In rclcpp, we use signal_handler to catch the signal SIGINT and SIGTERM, which creates a thread that capturing signals, I am wondering that could we use the same method to exit?
That's a good point. Currently, this check in rclc_executor_spin_some is used to stop spinning. It could be extended by catching a SGINT as well, as you mentioned. Or the while(true) condition in rclc_executor_spin (and other functions) could be replaced. Could you provide a pull request?
The only issue I see is, that rclc cannot rely on pthread library. It has to be portable for other RTOS, that do not support this thread API. Or an additional abstraction layer is necessary for thread creation.
The system test (#225) as well as manual tests revealed, that handling of SIGINT doesn't seem to work properly, yet.
That is, when using
rclc_executor_spin()
for example, code afterrclc_executor_spin()
(e.g. example_service_node.c#L81-L82) is not executed when program is aborted through SIGINT.The current context check in rclc_executor_spin_some doesn't seem to do the trick.
One option is to expose this feature through an explicit
rclc::ok()
, similar to rclcpp::ok()The text was updated successfully, but these errors were encountered: