Fix: force the poll() return value to be nb_fd
[lttng-tools.git] / src / common / compat / compat-poll.c
index 157a2d79de950a25e051df3875071586344f32b3..bacd96e842be04c0719f740205e42852972b5f8e 100644 (file)
@@ -164,7 +164,11 @@ int compat_poll_wait(struct lttng_poll_event *events, int timeout)
                goto error;
        }
 
-       return ret;
+       /*
+        * poll() should always iterate on all FDs since we handle the pollset in
+        * user space and after poll returns, we have to try every fd for a match.
+        */
+       return events->nb_fd;
 
 error:
        return -1;
This page took 0.023437 seconds and 4 git commands to generate.