ros / ros_comm

ROS communications-related packages, including core client libraries (roscpp, rospy, roslisp) and graph introspection tools (rostopic, rosnode, rosservice, rosparam).
http://wiki.ros.org/ros_comm
745 stars 911 forks source link

Change SIGINT timeout without modifying nodeprocess.py? #2356

Open michael-createc opened 8 months ago

michael-createc commented 8 months ago

I have a node that has quite a long clearup process to perform on exit, involving file IO etc., that takes a minute or so. However, at the moment, the only way I can work out to allow it to do this without timing out is to modify DEFAULT_SIGINT_TIMEOUT in my ROS install's nodeprocess.py file (https://github.com/ros/ros_comm/blob/melodic-devel/tools/roslaunch/src/roslaunch/nodeprocess.py). This is not ideal for many reasons (easy for someone else using the node to miss, involves changing the timeout for all nodes on the system, etc.).

Is there a better way to do this, per-node, e.g. in the launch file?