Fix: kernel snapshot handling of EAGAIN
[lttng-tools.git] / src / common / kernel-consumer / kernel-consumer.c
index 1079047f0137ce5b0d992e6b723998137288b288..0afa143a5e2d777ffc3707e0f495f34cd2b26fa4 100644 (file)
@@ -60,7 +60,11 @@ int lttng_kconsumer_take_snapshot(struct lttng_consumer_stream *stream)
        int infd = stream->wait_fd;
 
        ret = kernctl_snapshot(infd);
-       if (ret != 0) {
+       /*
+        * -EAGAIN is not an error, it just means that there is no data to
+        *  be read.
+        */
+       if (ret != 0 && ret != -EAGAIN) {
                PERROR("Getting sub-buffer snapshot.");
        }
 
This page took 0.023268 seconds and 4 git commands to generate.