ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

SIGACTION with Roslaunch - Use in a TCP server

asked 2018-02-11 10:21:52 -0600

lallemfa gravatar image

Hi everybody,

I am currently working on integrating a TCP communication between ROS and a web application. I made my own TCP code using sockets in C. In order to be able to close this cleanly, I would like to be able to use sigaction, however it seems roslaunch prevents the process to receive the signals. Is it normal or am I wrong? Here is a link to the code I made : Without ROS it seems to work fine !

I am using ROS Kinetic on a Linux Mint Mate 18.3 if it can help you understand.

Thanks for your help guys !

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-04-10 12:22:51 -0600

130s gravatar image

According to this informative thread, roslaunch handles SIGINT, SIGTERM, SIGKILL, but not SIGACTION . I've confirmed by scanning the latest code from that sigaction is not particularly handled.

$ git branch
* lunar-devel
$ git log -1
commit 283818529002c6d37e8b9ec554a17b40c6075c20
Author: nano-meter <>
Date:   Thu Apr 5 22:47:14 2018 +0200

    Add substitution when loading yaml files (#1354)

    * Add substitution when loading yaml files

    like in #1051

    * Add tests
$ ack-grep -A 1 -i sigaction .

Btw, just wondering if you're aware of some existing ROS packages that provide TCP communication. For websocket there is

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2018-02-11 10:21:52 -0600

Seen: 183 times

Last updated: Apr 10 '18