SIGPIPE Conflict and Unmasking
I am trying to call roscpp within another program that uses SIGPIPE. ROS is blocking this (in https://github.com/ros/ros_comm/blob/... ) and this breaks things.
Why is SIGPIPE ignored here? Presumably, this would be to prevent the default handler from terminating the process when a socket is disconnected.
My current workaround is to unmask SIGPIPE via sigprocmask() after the ROS libraries are loaded. This seems to be working fine in that I can communicate via ROS and the rest of the program can use SIGPIPE as it needs to. Are there any potential subtle errors that could arise from this?
Ideally, it seems that there should be an option to prevent roscpp from initially blocking SIGPIPE rather than it unconditionally modifying the process-global state.