summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2016-03-07 11:50:34 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2016-03-07 11:50:34 +0100
commit67777d01cd234a279fdfcf742f4c2689d41fbf98 (patch)
treeef6c8dcc07e8afbaaa18b22853a664119d321b00
parentd6a82ff09e15d2e76674562d2a1ebf6301efd064 (diff)
downloadgnutls-67777d01cd234a279fdfcf742f4c2689d41fbf98.tar.gz
gnutls_system_recv_timeout: restore poll on EINTR
-rw-r--r--lib/system.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/system.c b/lib/system.c
index a096cea242..731d734db4 100644
--- a/lib/system.c
+++ b/lib/system.c
@@ -179,7 +179,9 @@ int gnutls_system_recv_timeout(gnutls_transport_ptr_t ptr, unsigned int ms)
timeo = -1;
else
timeo = ms;
- ret = poll(&pfd, 1, timeo);
+ do {
+ ret = poll(&pfd, 1, timeo);
+ } while(ret == -1 && errno == EINTR);
#else
fd_set rfds;
struct timeval _tv, *tv = NULL;