projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tests: cleanly exit from test apps on reception of SIGTERM
[lttng-tools.git]
/
tests
/
utils
/
testapp
/
gen-ust-events
/
gen-ust-events.c
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 3cfadbe9976a70aa6bdc16240707d49160ca01b0..c5dd31a355e1294229529a4ff20c3a3026bf8347 100644
(file)
--- 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 <poll.h>
#include <errno.h>
#include "utils.h"
#include <poll.h>
#include <errno.h>
#include "utils.h"
+#include "signal-helper.h"
#define TRACEPOINT_DEFINE
#include "tp.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;
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.
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;
}
}
goto end;
}
}
+ if (should_quit) {
+ break;
+ }
}
end:
}
end:
This page took
0.029442 seconds
and
4
git commands to generate.