clearpathrobotics / robot_upstart

ROS package of helper functions related to bringing up roslaunch on system startup.
BSD 3-Clause "New" or "Revised" License
196 stars 96 forks source link

Service stop is killing all nodes not waiting to finish cleanly. #69

Open julianraheema opened 6 years ago

julianraheema commented 6 years ago

When I tried to stop myrobot service "sudo service myrobot stop", all nodes dies instantly rather than waiting to finish cleanly. But when I added this line "ExecStop=/usr/sbin/data-stop" to "/etc/systemd/system/multi-user.target.wants/data.service" the service stop works fine.

My linux is mint 18. Could you please help me to understand why this is happening?

Update: When ExecStop= is not exisit, the service sends the signKill by default which is kill instantly, and sigKill cant be captured by ros therefore nodes are dying not in proper way. https://www.freedesktop.org/software/systemd/man/systemd.service.html http://man7.org/linux/man-pages/man7/signal.7.html

Extra info are welcome.