From a9b0dbc2405118ef5c69b7834f7cb4617b883cd1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Mon, 19 Oct 2015 18:00:42 -0400 Subject: [PATCH] Fix: Retry poll on interruption MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- src/common/compat/compat-poll.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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"); -- 2.34.1