From: Jérémie Galarneau Date: Mon, 19 Oct 2015 22:00:42 +0000 (-0400) Subject: Fix: Retry poll on interruption X-Git-Tag: v2.8.0-rc1~251 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a9b0dbc2405118ef5c69b7834f7cb4617b883cd1;p=lttng-tools.git Fix: Retry poll on interruption Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/compat/compat-poll.c b/src/common/compat/compat-poll.c index e4f1a3fed..cc280c764 100644 --- a/src/common/compat/compat-poll.c +++ b/src/common/compat/compat-poll.c @@ -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");