Fix epoll not handling signal interruption
authorDavid Goulet <david.goulet@polymtl.ca>
Thu, 29 Sep 2011 16:10:36 +0000 (12:10 -0400)
committerDavid Goulet <david.goulet@polymtl.ca>
Thu, 29 Sep 2011 16:10:49 +0000 (12:10 -0400)
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
ltt-sessiond/compat/compat-epoll.c

index 578dd2e455a0ada7573972b9aebf913369208e7c..431c5eb0d5ecd8a5f2980db4fbe1a3440b74c5fa 100644 (file)
@@ -171,7 +171,9 @@ int compat_epoll_wait(struct lttng_poll_event *events, int timeout)
                goto error;
        }
 
-       ret = epoll_wait(events->epfd, events->events, events->nb_fd, timeout);
+       do {
+               ret = epoll_wait(events->epfd, events->events, events->nb_fd, timeout);
+       } while (ret == -1 && errno == EINTR);
        if (ret < 0) {
                /* At this point, every error is fatal */
                perror("epoll_wait");
This page took 0.025481 seconds and 4 git commands to generate.