ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

How are signals handled by roslaunch?

asked 2012-08-23 05:10:16 -0600

I have built a ROS node with signal handling because some files needed to be closed whenever the program was interrupted. Signal handling works fine when I run the node, but if I use roslaunch the node seems not to receive the appropriate signal.

How does the roslaunch server deal with Unix signals? My opinion is that it should be able to "forward" them to all processes running under the server, but that might just be a feature request.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2012-08-23 06:00:38 -0600

updated 2012-08-23 06:01:16 -0600

In order to ensure all nodes are actually killed when a roslaunch instance is stopped, rather than passing signals through, roslaunch first sends SIGINT, then SIGTERM, then SIGKILL, moving from one to the next if the process doesn't exit in time.

My gut tells me that trying to pass signals through could lead to undesirable behavior, but I don't really know. If you're interested in looking into this more, I'd encourage you to bring it up with the roslaunch SIG.

edit flag offensive delete link more

Comments

Does that happen for every signal? It seems like it happens only when I send SIGINT by pressing CTRL+C. If I send SIGTSTP by pressing CTRL+Z it seems like it simply ignores it.

georgebrindeiro gravatar image georgebrindeiro  ( 2012-08-23 08:58:16 -0600 )edit

Question Tools

Stats

Asked: 2012-08-23 05:10:16 -0600

Seen: 1,558 times

Last updated: Aug 23 '12