curl/tests/server
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
..
.gitignore NTLM_WB: delete remains in tests, docs updates 2024-09-10 14:13:36 +02:00
base64.pl copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
CMakeLists.txt cmake: allow building tests in unity mode 2024-09-19 21:32:58 +02:00
disabled.c curl: add options for safe/no CA bundle search (Windows) 2024-09-22 18:17:25 +02:00
getpart.c server/getpart: delete unused code 2024-09-09 16:57:36 +02:00
getpart.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
Makefile.am cmake: allow building tests in unity mode 2024-09-19 21:32:58 +02:00
Makefile.inc NTLM_WB: delete remains in tests, docs updates 2024-09-10 14:13:36 +02:00
mqttd.c lib/src: white space edits to comply better with code style 2024-09-19 14:59:12 +02:00
resolve.c cmake: allow building tests in unity mode 2024-09-19 21:32:58 +02:00
rtspd.c lib/src: white space edits to comply better with code style 2024-09-19 14:59:12 +02:00
server_setup.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
server_sockaddr.h build: prefer USE_IPV6 macro internally (was: ENABLE_IPV6) 2024-04-13 08:33:26 +00:00
sockfilt.c tidy-up: rename CURL_WINDOWS_APP to CURL_WINDOWS_UWP 2024-09-19 19:24:12 +02:00
socksd.c lib/src: white space edits to comply better with code style 2024-09-19 14:59:12 +02:00
sws.c cleanup: added space around ternary expressions 2024-09-25 08:02:01 +02:00
testpart.c lib/src: white space edits to comply better with code style 2024-09-19 14:59:12 +02:00
tftp.h tests: tidy up types in server code 2024-05-13 11:16:26 +02:00
tftpd.c lib/src: white space edits to comply better with code style 2024-09-19 14:59:12 +02:00
util.c select: use poll() if existing, avoid poll() with no sockets 2024-10-01 15:11:50 +02:00
util.h build: enable missing OpenSSF-recommended warnings, with fixes 2023-12-16 13:12:37 +00:00