From e8addb79cd0ad5105c9200a2b0c22e8c1200f8e0 Mon Sep 17 00:00:00 2001 From: Pierre Carru Date: Mon, 27 Sep 2021 17:58:02 +0200 Subject: [PATCH] libvncserver: handle EINTR --- libvncserver/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libvncserver/main.c b/libvncserver/main.c index 73303af80..859f8c61b 100644 --- a/libvncserver/main.c +++ b/libvncserver/main.c @@ -560,10 +560,14 @@ clientInput(void *data) tv.tv_sec = 60; /* 1 minute */ tv.tv_usec = 0; +retry: n = select(nfds + 1, &rfds, &wfds, &efds, &tv); if (n < 0) { rfbLogPerror("ReadExact: select"); + if (errno == EINTR) { + goto retry; + } break; } if (n == 0) /* timeout */