X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fconsumer.c;h=974c65f550c94a6be3fb94c18227f86ad133076e;hb=51d7db73266e8bf7e3248981d722d3743c38d670;hp=88e8d9d28017ed5fb0fccbee22fad316f1ed402c;hpb=00e2e675d54dc726a7c8f8887c889cc8ef022003;p=lttng-tools.git diff --git a/src/common/consumer.c b/src/common/consumer.c index 88e8d9d28..974c65f55 100644 --- a/src/common/consumer.c +++ b/src/common/consumer.c @@ -875,7 +875,9 @@ void lttng_consumer_should_exit(struct lttng_consumer_local_data *ctx) { int ret; consumer_quit = 1; - ret = write(ctx->consumer_should_quit[1], "4", 1); + do { + ret = write(ctx->consumer_should_quit[1], "4", 1); + } while (ret < 0 && errno == EINTR); if (ret < 0) { perror("write consumer quit"); } @@ -1522,7 +1524,7 @@ end: */ do { ret = write(ctx->consumer_poll_pipe[1], "", 1); - } while (ret == -1UL && errno == EINTR); + } while (ret < 0 && errno == EINTR); rcu_unregister_thread(); return NULL; }