Fix: compat poll: add missing empty revents checks
[lttng-tools.git] / src / bin / lttng-relayd / live.c
index cb1c6f80b4d96519d96d3345cd3bac94cc4efb4d..6c3e94f273f55afeb60da5597a4293c452bdc015 100644 (file)
@@ -515,6 +515,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) {
@@ -1950,6 +1955,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.025011 seconds and 4 git commands to generate.