Fix: compat poll: add missing empty revents checks
[lttng-tools.git] / src / bin / lttng-relayd / live.c
index fd570e0fc4bd801ebe065e5fd32b2f1c7780323f..756efbedef8434c7126148a7fbdb09e28c57e1e5 100644 (file)
@@ -488,6 +488,11 @@ restart:
                        revents = LTTNG_POLL_GETEV(&events, i);
                        pollfd = LTTNG_POLL_GETFD(&events, i);
 
+                       if (!revents) {
+                               /* No activity for this FD (poll implementation). */
+                               continue;
+                       }
+
                        /* Thread quit pipe has been closed. Killing thread. */
                        ret = check_thread_quit_pipe(pollfd, revents);
                        if (ret) {
@@ -1922,6 +1927,11 @@ restart:
 
                        health_code_update();
 
+                       if (!revents) {
+                               /* No activity for this FD (poll implementation). */
+                               continue;
+                       }
+
                        /* Thread quit pipe has been closed. Killing thread. */
                        ret = check_thread_quit_pipe(pollfd, revents);
                        if (ret) {
This page took 0.026367 seconds and 5 git commands to generate.