From 65a91c9807b3083dee63f1697639fa7e656e3bb6 Mon Sep 17 00:00:00 2001 From: Jiwoong Im Date: Thu, 10 Nov 2016 15:04:02 +0900 Subject: [PATCH] add EINTR exception handling in poll Change-Id: I9bc64c756417f3a4a378356c4ea2b364de2948d7 Signed-off-by: Jiwoong Im --- lib/buxton2.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/buxton2.c b/lib/buxton2.c index a221f86..252f3a5 100644 --- a/lib/buxton2.c +++ b/lib/buxton2.c @@ -776,6 +776,11 @@ static int wait_msg(struct buxton_client *client, guint32 msgid) case -1: bxt_err("wait response: poll: fd %d errno %d", client->fd, errno); + if (errno == EINTR) { + clock_gettime(CLOCK_MONOTONIC, &t); + ms = TS_SUB(&to, &t); + continue; + } break; case 0: /* poll timeout, do nothing */ -- 2.7.4