curl/lib
Daniel Stenberg c72cefea0f
select: use poll() if existing, avoid poll() with no sockets
poll() on macOS 10.12 was deemed broken in 2016 when we discovered that
it misbehaves when provided with no sockets to wait for. The
HAVE_POLL_FINE is used to mark a poll() implementation that behaves
correctly: it *should* still wait the timeout time.

curl has therefore opted to use select() on Apple operating systems ever
since. To avoid the risk that this or other breakage cause problems.

However, using select() internally is also bad because it suffers from
problems when using file descriptors beyond 1024.

This change makes poll() used if it is present, but if there is no
sockets to wait for it avoids using poll() and instead falls back to
select() - but without any sockets to wait for there is no 1024 problem.

This removes all previous special-handling involving HAVE_POLL_FINE.

ref: https://daniel.haxx.se/blog/2016/10/11/poll-on-mac-10-12-is-broken/

Closes #15096
2024-10-01 15:11:50 +02:00
..
vauth
vquic
vssh
vtls
.checksrc
.gitattributes
.gitignore
altsvc.c
altsvc.h llist: remove direct struct accesses, use only functions 2024-08-12 13:18:10 +02:00
amigaos.c
amigaos.h
arpa_telnet.h
asyn-ares.c
asyn-thread.c
asyn.h
base64.c
bufq.c
bufq.h
bufref.c
bufref.h
c-hyper.c
c-hyper.h
cf-h1-proxy.c
cf-h1-proxy.h
cf-h2-proxy.c
cf-h2-proxy.h
cf-haproxy.c
cf-haproxy.h
cf-https-connect.c
cf-https-connect.h
cf-socket.c
cf-socket.h
cfilters.c request: on shutdown send, proceed normally on timeout 2024-09-20 23:43:43 +02:00
cfilters.h
CMakeLists.txt
config-amigaos.h
config-dos.h
config-mac.h
config-os400.h
config-plan9.h
config-riscos.h
config-win32.h
config-win32ce.h
conncache.c
conncache.h
connect.c
connect.h
content_encoding.c
content_encoding.h
cookie.c
cookie.h
curl_addrinfo.c
curl_addrinfo.h code: language cleanup in comments 2024-07-01 22:58:55 +02:00
curl_base64.h
curl_config.h.cmake
curl_ctype.h
curl_des.c
curl_des.h
curl_endian.c
curl_endian.h
curl_fnmatch.c
curl_fnmatch.h
curl_get_line.c
curl_get_line.h
curl_gethostname.c
curl_gethostname.h
curl_gssapi.c
curl_gssapi.h
curl_hmac.h
curl_krb5.h
curl_ldap.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
curl_md4.h
curl_md5.h
curl_memory.h
curl_memrchr.c
curl_memrchr.h
curl_multibyte.c
curl_multibyte.h tidy-up: OS names 2024-08-04 19:17:45 +02:00
curl_ntlm_core.c
curl_ntlm_core.h
curl_path.c
curl_path.h
curl_printf.h
curl_range.c lib: use FMT_ as prefix instead of CURL_FORMAT_ 2024-09-03 08:45:45 +02:00
curl_range.h
curl_rtmp.c
curl_rtmp.h
curl_sasl.c
curl_sasl.h
curl_setup_once.h
curl_setup.h
curl_sha256.h
curl_sha512_256.c
curl_sha512_256.h
curl_sspi.c
curl_sspi.h
curl_threads.c
curl_threads.h
curl_trc.c
curl_trc.h
curlx.h
cw-out.c
cw-out.h
dict.c
dict.h
dllmain.c
doh.c
doh.h
dynbuf.c
dynbuf.h
dynhds.c
dynhds.h
easy_lock.h
easy.c WebSockets: make support official (non-experimental) 2024-09-27 13:20:25 +02:00
easygetopt.c
easyif.h
easyoptions.c
easyoptions.h
escape.c
escape.h
file.c
file.h
fileinfo.c
fileinfo.h
fopen.c
fopen.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
formdata.c
formdata.h
ftp.c
ftp.h
ftplistparser.c
ftplistparser.h
functypes.h
getenv.c
getinfo.c
getinfo.h
gopher.c
gopher.h
hash.c hash: provide asserts to verify API use 2024-08-15 08:54:19 +02:00
hash.h
headers.c
headers.h
hmac.c
hostasyn.c
hostip4.c
hostip6.c
hostip.c
hostip.h
hostsyn.c
hsts.c
hsts.h
http1.c lib/src: white space edits to comply better with code style 2024-09-19 14:59:12 +02:00
http1.h
http2.c
http2.h
http_aws_sigv4.c
http_aws_sigv4.h
http_chunks.c
http_chunks.h code: language cleanup in comments 2024-07-01 22:58:55 +02:00
http_digest.c lib: add ability to disable auths individually 2023-09-07 17:45:06 +02:00
http_digest.h
http_negotiate.c
http_negotiate.h
http_ntlm.c
http_ntlm.h
http_proxy.c
http_proxy.h
http.c
http.h
idn.c
idn.h
if2ip.c
if2ip.h
imap.c
imap.h
inet_ntop.c
inet_ntop.h
inet_pton.c
inet_pton.h
krb5.c
ldap.c
libcurl.def
libcurl.rc
libcurl.vers.in
llist.c
llist.h
macos.c
macos.h
Makefile.am
Makefile.inc
Makefile.mk cmake, Makefile.mk: use -isystem for dep headers, silence BearSSL issues 2024-09-19 19:24:01 +02:00
Makefile.soname
md4.c
md5.c
memdebug.c
memdebug.h
mime.c
mime.h
mprintf.c
mqtt.c
mqtt.h
multi.c
multihandle.h
multiif.h cpool: rename "connection cache/conncache" to "Connection Pools/cpool" 2024-08-28 13:52:49 +02:00
netrc.c
netrc.h
nonblock.c
nonblock.h
noproxy.c
noproxy.h
openldap.c
optiontable.pl
parsedate.c lib/src: white space edits to comply better with code style 2024-09-19 14:59:12 +02:00
parsedate.h
pingpong.c
pingpong.h
pop3.c
pop3.h
progress.c
progress.h
psl.c
psl.h
rand.c tidy-up: rename CURL_WINDOWS_APP to CURL_WINDOWS_UWP 2024-09-19 19:24:12 +02:00
rand.h
rename.c
rename.h
request.c
request.h
rtsp.c
rtsp.h http: remove "struct HTTP" 2024-06-12 16:04:53 +02:00
select.c
select.h
sendf.c
sendf.h transfer: do not use EXPIRE_NOW while blocked 2024-06-13 15:13:43 +02:00
setopt.c
setopt.h
setup-os400.h
setup-vms.h
setup-win32.h
sha256.c
share.c
share.h
sigpipe.h
slist.c
slist.h
smb.c
smb.h
smtp.c
smtp.h
sockaddr.h
socketpair.c
socketpair.h
socks_gssapi.c
socks_sspi.c
socks.c
socks.h
speedcheck.c
speedcheck.h
splay.c
splay.h
strcase.c
strcase.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
strdup.c
strdup.h
strerror.c code: language cleanup in comments 2024-07-01 22:58:55 +02:00
strerror.h
strtok.c
strtok.h
strtoofft.c tidy-up: misc spelling (bit, ASCII) 2024-08-15 15:30:09 +02:00
strtoofft.h
system_win32.c
system_win32.h
telnet.c
telnet.h
tftp.c
tftp.h
timediff.c
timediff.h
timeval.c
timeval.h
transfer.c
transfer.h
url.c
url.h
urlapi-int.h
urlapi.c
urldata.h
version_win32.c
version_win32.h
version.c
warnless.c
warnless.h
ws.c
ws.h