summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
2875672)
Missing should_quit checks can cause the live plugin to
report errors on exit.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
printf_verbose("Asking for new streams returns %d\n",
ret);
if (ret < 0) {
printf_verbose("Asking for new streams returns %d\n",
ret);
if (ret < 0) {
+ if (lttng_live_should_quit()) {
+ goto end;
+ }
if (ret == -LTTNG_VIEWER_NEW_STREAMS_HUP) {
printf_verbose("Session %" PRIu64 " closed\n",
id);
if (ret == -LTTNG_VIEWER_NEW_STREAMS_HUP) {
printf_verbose("Session %" PRIu64 " closed\n",
id);
ret = get_next_index(session->ctx, viewer_stream, cur_index);
if (ret < 0) {
pos->offset = EOF;
ret = get_next_index(session->ctx, viewer_stream, cur_index);
if (ret < 0) {
pos->offset = EOF;
- fprintf(stderr, "[error] get_next_index failed\n");
+ if (!lttng_live_should_quit()) {
+ fprintf(stderr, "[error] get_next_index failed\n");
+ }
goto retry;
} else if (ret < 0) {
pos->offset = EOF;
goto retry;
} else if (ret < 0) {
pos->offset = EOF;
- fprintf(stderr, "[error] get_data_packet failed\n");
+ if (!lttng_live_should_quit()) {
+ fprintf(stderr, "[error] get_data_packet failed\n");
+ }
begin_pos.type = BT_SEEK_BEGIN;
iter = bt_ctf_iter_create(ctx->bt_ctx, &begin_pos, NULL);
if (!iter) {
begin_pos.type = BT_SEEK_BEGIN;
iter = bt_ctf_iter_create(ctx->bt_ctx, &begin_pos, NULL);
if (!iter) {
+ if (lttng_live_should_quit()) {
+ ret = 0;
+ goto end;
+ }
fprintf(stderr, "[error] Iterator creation error\n");
goto end;
}
fprintf(stderr, "[error] Iterator creation error\n");
goto end;
}
end_free:
bt_context_put(ctx->bt_ctx);
end:
end_free:
bt_context_put(ctx->bt_ctx);
end:
+ if (lttng_live_should_quit()) {
+ ret = 0;
+ }