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;