X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Fcompat%2Fcompat-poll.c;h=4ea23c17318e1439f36a94b134194d13b070e4de;hb=4d93602e7b632e134a0ca254f4211df8760738a5;hp=254ce271e71c2f1b9249942e229b5a4b5b7fc82f;hpb=9e43a0f46338f2e743faf88d2e3d1f3f681707f3;p=lttng-tools.git diff --git a/src/common/compat/compat-poll.c b/src/common/compat/compat-poll.c index 254ce271e..4ea23c173 100644 --- a/src/common/compat/compat-poll.c +++ b/src/common/compat/compat-poll.c @@ -291,7 +291,8 @@ error: /* * Wait on poll() with timeout. Blocking call. */ -int compat_poll_wait(struct lttng_poll_event *events, int timeout) +int compat_poll_wait(struct lttng_poll_event *events, int timeout, + bool interruptible) { int ret, active_fd_count; int idle_pfd_index = 0; @@ -320,10 +321,11 @@ int compat_poll_wait(struct lttng_poll_event *events, int timeout) do { ret = poll(events->wait.events, events->wait.nb_fd, timeout); - } while (ret == -1 && errno == EINTR); + } while (!interruptible && ret == -1 && errno == EINTR); if (ret < 0) { - /* At this point, every error is fatal */ - PERROR("poll wait"); + if (errno != EINTR) { + PERROR("poll wait"); + } goto error; }