From 5254e6abc3c5b34a7559039e42c5ac6cbef43360 Mon Sep 17 00:00:00 2001 From: alexfneves Date: Mon, 18 Nov 2019 21:45:39 -0300 Subject: [PATCH] Bug fix on shutdown_on_sigint (not set on InitOptions constructors) (#850) Signed-off-by: Alex Fernandes Neves --- rclcpp/src/rclcpp/init_options.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rclcpp/src/rclcpp/init_options.cpp b/rclcpp/src/rclcpp/init_options.cpp index db753f6..ba46edb 100644 --- a/rclcpp/src/rclcpp/init_options.cpp +++ b/rclcpp/src/rclcpp/init_options.cpp @@ -42,7 +42,9 @@ InitOptions::InitOptions(const rcl_init_options_t & init_options) InitOptions::InitOptions(const InitOptions & other) : InitOptions(*other.get_rcl_init_options()) -{} +{ + shutdown_on_sigint = other.shutdown_on_sigint; +} InitOptions & InitOptions::operator=(const InitOptions & other) @@ -53,6 +55,7 @@ InitOptions::operator=(const InitOptions & other) if (RCL_RET_OK != ret) { rclcpp::exceptions::throw_from_rcl_error(ret, "failed to copy rcl init options"); } + this->shutdown_on_sigint = other.shutdown_on_sigint; } return *this; }