1 From 52e822173aa3cd4f610531d32fbf943f026cdca6 Mon Sep 17 00:00:00 2001
2 From: Thomas Weißschuh <thomas@t-8ch.de>
3 Date: Sun, 3 Jul 2022 18:20:44 +0200
4 Subject: select: do not return fatal error on EINTR from poll()
6 The same was done for select() in 5912da25 but poll() was missed.
8 Bug: https://bugs.archlinux.org/task/75201
9 Reported-by: Alexandre Bury (gyscos at archlinux)
11 Ref: https://github.com/curl/curl/issues/8921
12 Ref: https://github.com/curl/curl/pull/8961
13 Ref: https://github.com/curl/curl/commit/5912da25#r77584294
15 Closes https://github.com/curl/curl/pull/9091
17 lib/select.c | 6 +++++-
18 1 file changed, 5 insertions(+), 1 deletion(-)
20 diff --git a/lib/select.c b/lib/select.c
21 index c16358d56..2ac074677 100644
24 @@ -310,8 +310,12 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, timediff_t timeout_ms)
27 r = poll(ufds, nfds, pending_ms);
30 + if((r == -1) && (SOCKERRNO == EINTR))
31 + /* make EINTR from select or poll not a "lethal" error */
36 for(i = 0; i < nfds; i++) {
37 if(ufds[i].fd == CURL_SOCKET_BAD)