Fix: Retry poll on interruption
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 19 Oct 2015 22:00:42 +0000 (18:00 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 19 Oct 2015 22:00:42 +0000 (18:00 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/compat/compat-poll.c

index e4f1a3fed47c296c99feb980aa35d8615dcf667f..cc280c7640ce4d011904da27fac43712ce1df272 100644 (file)
@@ -268,7 +268,9 @@ int compat_poll_wait(struct lttng_poll_event *events, int timeout)
                }
        }
 
-       ret = poll(events->wait.events, events->wait.nb_fd, timeout);
+       do {
+               ret = poll(events->wait.events, events->wait.nb_fd, timeout);
+       } while (ret == -1 && errno == EINTR);
        if (ret < 0) {
                /* At this point, every error is fatal */
                PERROR("poll wait");
This page took 0.027128 seconds and 4 git commands to generate.