From cb48695027e7b7b9ff249284287055f7d6f53c5f Mon Sep 17 00:00:00 2001 From: Eran Date: Fri, 3 Jan 2025 19:25:48 +0200 Subject: [PATCH] rs-dds-adapter use control-c-handler rather than cin for Jenkins --- tools/dds/dds-adapter/rs-dds-adapter.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/dds/dds-adapter/rs-dds-adapter.cpp b/tools/dds/dds-adapter/rs-dds-adapter.cpp index 30e43efc4a..e30ec392ed 100644 --- a/tools/dds/dds-adapter/rs-dds-adapter.cpp +++ b/tools/dds/dds-adapter/rs-dds-adapter.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -195,8 +196,10 @@ try device_handlers_list.erase( dev ); } ); - std::cin.ignore(std::numeric_limits::max(), 0);// Pend until CTRL + C is pressed - + { + rsutils::concurrency::control_c_handler control_c; + control_c.wait(); + } std::cout << "Shutting down rs-dds-adapter..." << std::endl; return EXIT_SUCCESS;