Conversation
clalancette
left a comment
There was a problem hiding this comment.
I have to say that I'm nervous about this in general. I don't have anything specific to point to, but every time we've messed with the signal handling it takes quite a while to iron all of the bugs out.
That's not to say that we shouldn't do this; but I do think we should consider waiting on this one until after Galactic, which will give us a whole year to figure out where the bugs are.
There was a problem hiding this comment.
This seems like a fine port, except for the fact this no longer chains signal handlers at the C level (CPython signal handling doesn't do that). If Python signal handlers are setup before any C extension with proper chaining does so, we should be OK I guess.
Yeah, that's fair. I can leave this PR up until Galactic. If we do that, I'll need to think of a way to be backwards compatible with the use of rclpy_handle for guard conditions in the C code as we eliminate rclpy_handle_t elsewhere. |
a35877a to
d940805
Compare
|
Re-re-targeted back to master and re-marking as draft. This should stay in rolling for a while before it's considered for backport (if at all). |
|
@sloretz is there any way to retarget this to |
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
09a1c90 to
e4c7776
Compare
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
|
@ros-pull-request-builder retest this please |
|
Can I suggest we do a full build+test before we merge this one? That will at least give us an idea if any of the signals that launch files send to processes have problems. |
|
I converted this back to a draft because the signal handling in Python is not as straight forward as I hoped. the |
|
I'm going to close this in favor of #814. Using Python's built-in signal library has a lot of downsides, and being only able to register and unregister a signal handler from the same thread Python was initialized in is especially hard to work around. |
Part of #665 because it removes the signal handler CPython extension
This implements signal handling in Python using the
signallibrary rather than doing it in C. I think the benefits outweigh the drawbacks.Benefits:
rclpy_handle_...Drawbacks
With signal handling in C
With signal handling in Python, the last frame in the stack trace printed is a frame inside the Python signal handler.