ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
ros is already handling SIGINT. If you override that handler, then you are responsible for shutting down the ros node.
In general in roscpp, you should be polling ros::ok()
to determine when ros node shutdown has been requested, rather than grabbing SIGINT yourself. There are other mechanisms (e.g. rosnode kill
) to request shutdown that do not use a signal.
2 | No.2 Revision |
ros is already handling SIGINT. If you override that handler, then you are responsible for shutting down the ros node.
In general in roscpp, you should be polling ros::ok()
to determine when ros node shutdown has been requested, rather than grabbing SIGINT yourself. There are other mechanisms (e.g. rosnode kill
) to request shutdown that do not use a signal.
Also, there is no way for you to "make sure your thread is terminated first." In a ros-like system, you have no control over when a connection goes down or when a different linux process exits.