We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 92860d5 commit 01a7805Copy full SHA for 01a7805
test_package/main.cpp
@@ -1,8 +1,6 @@
1
// This file is adapted from examples/modules/simple/main.cpp, but it runs the module
2
// service in a thread which is killed after two seconds. This is a workaround to conform with the
3
// expected format of a conan test package executable.
4
-#include <csignal>
5
-
6
#include <iostream>
7
#include <memory>
8
#include <sstream>
@@ -106,9 +104,7 @@ int main(int argc, char** argv) try {
106
104
std::thread t{[&my_mod] { my_mod->serve(); }};
107
105
std::this_thread::sleep_for(std::chrono::seconds{2});
108
109
- pthread_kill(t.native_handle(), SIGTERM);
110
111
- t.join();
+ t.detach();
112
113
return EXIT_SUCCESS;
114
} catch (const viam::sdk::Exception& ex) {
0 commit comments