Skip to content

Commit

Permalink
rs-dds-adapter use control-c-handler rather than cin for Jenkins
Browse files Browse the repository at this point in the history
  • Loading branch information
maloel committed Jan 3, 2025
1 parent 5f5b74a commit cb48695
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tools/dds/dds-adapter/rs-dds-adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <rsutils/easylogging/easyloggingpp.h>
#include <rsutils/json.h>
#include <rsutils/json-config.h>
#include <rsutils/concurrency/control-c-handler.h>

#include <string>
#include <iostream>
Expand Down Expand Up @@ -195,8 +196,10 @@ try
device_handlers_list.erase( dev );
} );

std::cin.ignore(std::numeric_limits<std::streamsize>::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;
Expand Down

0 comments on commit cb48695

Please sign in to comment.