Fix: compat poll: add missing empty revents checks
[lttng-tools.git] / src / bin / lttng-sessiond / ht-cleanup.c
index ace41e5cd5654f6a791e50c82fe90bcc8c406722..373c913dccae1bbb484fefc8e518b9c3821ef255 100644 (file)
@@ -96,6 +96,11 @@ restart:
                        revents = LTTNG_POLL_GETEV(&events, i);
                        pollfd = LTTNG_POLL_GETFD(&events, i);
 
+                       if (!revents) {
+                               /* No activity for this FD (poll implementation). */
+                               continue;
+                       }
+
                        if (pollfd != ht_cleanup_pipe[0]) {
                                continue;
                        }
@@ -140,6 +145,11 @@ restart:
                        revents = LTTNG_POLL_GETEV(&events, i);
                        pollfd = LTTNG_POLL_GETFD(&events, i);
 
+                       if (!revents) {
+                               /* No activity for this FD (poll implementation). */
+                               continue;
+                       }
+
                        if (pollfd == ht_cleanup_pipe[0]) {
                                continue;
                        }
This page took 0.022982 seconds and 4 git commands to generate.