Fix: consumer fd recv poll should be sensitive to POLLPRI too
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 11 Apr 2012 22:15:24 +0000 (18:15 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 11 Apr 2012 22:15:24 +0000 (18:15 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
src/common/consumer.c

index 74a9b0ad2095216f8d11b6836a91305dba795300..2604f3d060574c1c7677047fcc16581a5c54818d 100644 (file)
@@ -538,7 +538,7 @@ int consumer_update_poll_array(
         * increment i so nb_fd is the number of real FD.
         */
        (*pollfd)[i].fd = ctx->consumer_poll_pipe[0];
-       (*pollfd)[i].events = POLLIN;
+       (*pollfd)[i].events = POLLIN | POLLPRI;
        return i;
 }
 
@@ -562,7 +562,7 @@ restart:
                perror("Poll error");
                goto exit;
        }
-       if (consumer_sockpoll[0].revents & POLLIN) {
+       if (consumer_sockpoll[0].revents & (POLLIN | POLLPRI)) {
                DBG("consumer_should_quit wake up");
                goto exit;
        }
@@ -1018,7 +1018,7 @@ void *lttng_consumer_thread_poll_fds(void *data)
                 * array. We want to prioritize array update over
                 * low-priority reads.
                 */
-               if (pollfd[nb_fd].revents & POLLIN) {
+               if (pollfd[nb_fd].revents & (POLLIN | POLLPRI)) {
                        DBG("consumer_poll_pipe wake up");
                        tmp2 = read(ctx->consumer_poll_pipe[0], &tmp, 1);
                        if (tmp2 < 0) {
This page took 0.035245 seconds and 4 git commands to generate.