Change in rclcpp/rclpy: shutting down gracefully on SIGTERM

A SIGTERM handler is planned to be added to rclcpp/rclpy, implementing the same behavior as the current SIGINT handler.

rclcpp draft PR: Handle sigterm, in the same way we handle sigint by ivanpauno · Pull Request #1771 · ros2/rclcpp · GitHub

The plan is to make it optional, a flag to disable it can be passed to init(), which will be ON by default.

There’s a small chance of regressions, so if you’re aware of any or if this affect your code after it gets merged, please let us know.

There’s also a plan to backport the option to old releases, but in that case the option will be OFF by default.

Best,
Ivan

6 Likes