Skip to content

Commit 414787b

Browse files
Fix coherent_presentation example build
1 parent 67743b9 commit 414787b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

examples/connext_dds/coherent_presentation/c++11/application.hpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,22 @@
1919

2020
namespace application {
2121

22+
/ Catch control-C and tell application to shut down
23+
bool shutdown_requested = false;
24+
25+
inline void stop_handler(int)
26+
{
27+
shutdown_requested = true;
28+
std::cout << "preparing to shut down..." << std::endl;
29+
}
30+
31+
inline void setup_signal_handlers()
32+
{
33+
signal(SIGINT, stop_handler);
34+
signal(SIGTERM, stop_handler);
35+
}
36+
37+
2238
enum class ParseReturn { ok, failure, exit };
2339

2440
struct ApplicationArguments {

0 commit comments

Comments
 (0)