Merge pull request #17 from ros2/launch_package
add rclcpp::shutdown() function
This commit is contained in:
commit
9064648c23
2 changed files with 10 additions and 0 deletions
|
@ -60,6 +60,7 @@ using rclcpp::timer::TimerBase;
|
|||
using rclcpp::timer::WallTimer;
|
||||
typedef rclcpp::context::Context::SharedPtr ContextSharedPtr;
|
||||
using rclcpp::utilities::ok;
|
||||
using rclcpp::utilities::shutdown;
|
||||
using rclcpp::utilities::init;
|
||||
using rclcpp::utilities::sleep_for;
|
||||
|
||||
|
|
|
@ -127,6 +127,15 @@ ok()
|
|||
return ::g_signal_status == 0;
|
||||
}
|
||||
|
||||
void
|
||||
shutdown()
|
||||
{
|
||||
g_signal_status = SIGINT;
|
||||
rmw_trigger_guard_condition(g_sigint_guard_cond_handle);
|
||||
g_interrupt_condition_variable.notify_all();
|
||||
}
|
||||
|
||||
|
||||
rmw_guard_condition_t *
|
||||
get_global_sigint_guard_condition()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue