DBG("Received STOP command");
goto end;
}
- if (ret < 0) {
- ERR("Communication interrupted on command socket");
+ if (ret <= 0) {
+ /*
+ * This could simply be a session daemon quitting. Don't output
+ * ERR() here.
+ */
+ DBG("Communication interrupted on command socket");
goto end;
}
if (consumer_quit) {
ret = write(ctx->consumer_poll_pipe[1], "", 1);
} while (ret == -1UL && errno == EINTR);
end_nosignal:
- return 0;
+
+ /*
+ * Return 1 to indicate success since the 0 value can be a socket shutdown
+ * during the recv() or send() call.
+ */
+ return 1;
}
/*
ret = write(ctx->consumer_poll_pipe[1], "", 1);
} while (ret == -1UL && errno == EINTR);
end_nosignal:
- return 0;
+
+ /*
+ * Return 1 to indicate success since the 0 value can be a socket shutdown
+ * during the recv() or send() call.
+ */
+ return 1;
}
int lttng_ustconsumer_allocate_channel(struct lttng_consumer_channel *chan)