X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fconsumer.c;h=974c65f550c94a6be3fb94c18227f86ad133076e;hp=88e8d9d28017ed5fb0fccbee22fad316f1ed402c;hb=6f94560a050962daad560dac2823bd97b0b1bf98;hpb=e3678fd81cd6d83ea45f38a3d834bbdcf83f3f8f 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; }