X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=tests%2Futils%2Ftestapp%2Fgen-ust-events%2Fgen-ust-events.c;h=c5dd31a355e1294229529a4ff20c3a3026bf8347;hb=95170e51ab1938d82b929549e2d4d813a56c163e;hp=3cfadbe9976a70aa6bdc16240707d49160ca01b0;hpb=54a3f90379492bcfa90e261922232d1a24372fd5;p=lttng-tools.git diff --git a/tests/utils/testapp/gen-ust-events/gen-ust-events.c b/tests/utils/testapp/gen-ust-events/gen-ust-events.c index 3cfadbe99..c5dd31a35 100644 --- a/tests/utils/testapp/gen-ust-events/gen-ust-events.c +++ b/tests/utils/testapp/gen-ust-events/gen-ust-events.c @@ -32,6 +32,7 @@ #include #include #include "utils.h" +#include "signal-helper.h" #define TRACEPOINT_DEFINE #include "tp.h" @@ -90,6 +91,11 @@ int main(int argc, char **argv) char *after_first_event_file_path = NULL; char *before_last_event_file_path = NULL; + if (set_signal_handler()) { + ret = -1; + goto end; + } + if (argc >= 2) { /* * If nr_iter is negative, do an infinite tracing loop. @@ -133,6 +139,9 @@ int main(int argc, char **argv) goto end; } } + if (should_quit) { + break; + } } end: