curl/CMake
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
..
Platforms select: use poll() if existing, avoid poll() with no sockets 2024-10-01 15:11:50 +02:00
cmake_uninstall.cmake.in
CMakeConfigurableFile.in
curl-config.cmake.in cmake: tidy up 2024-09-22 09:51:15 +02:00
CurlSymbolHiding.cmake cmake: tidy up option descriptions 2024-08-21 23:36:12 +02:00
CurlTests.c
FindBearSSL.cmake cmake: fix Find module and package names 2024-08-20 00:44:43 +02:00
FindBrotli.cmake cmake: tidy up more in Find modules 2024-08-18 22:53:09 +02:00
FindCares.cmake cmake: rename Find modules 2024-08-20 00:50:10 +02:00
FindGSS.cmake cmake: minor tidy-ups 2024-08-26 11:00:08 +02:00
FindLibgsasl.cmake cmake: respect cflags/libdirs of native pkg-config detections 2024-08-23 10:43:43 +02:00
FindLibidn2.cmake cmake: respect cflags/libdirs of native pkg-config detections 2024-08-23 10:43:43 +02:00
FindLibpsl.cmake cmake: rename Find modules 2024-08-20 00:50:10 +02:00
FindLibssh2.cmake cmake: rename Find modules 2024-08-20 00:50:10 +02:00
FindLibssh.cmake cmake: respect cflags/libdirs of native pkg-config detections 2024-08-23 10:43:43 +02:00
FindLibuv.cmake cmake: respect cflags/libdirs of native pkg-config detections 2024-08-23 10:43:43 +02:00
FindMbedTLS.cmake cmake: tidy up more in Find modules 2024-08-18 22:53:09 +02:00
FindMSH3.cmake cmake: tidy up more in Find modules 2024-08-18 22:53:09 +02:00
FindNettle.cmake cmake: respect cflags/libdirs of native pkg-config detections 2024-08-23 10:43:43 +02:00
FindNGHTTP2.cmake cmake: tidy up more in Find modules 2024-08-18 22:53:09 +02:00
FindNGHTTP3.cmake cmake: tidy up more in Find modules 2024-08-18 22:53:09 +02:00
FindNGTCP2.cmake cmake/FindNGTCP2: use library path as hint for finding the crypto module 2024-09-19 15:56:30 +02:00
FindQuiche.cmake cmake: rename Find modules 2024-08-20 00:50:10 +02:00
FindRustls.cmake cmake: rename Find modules 2024-08-20 00:50:10 +02:00
FindWolfSSH.cmake cmake: tidy up more in Find modules 2024-08-18 22:53:09 +02:00
FindWolfSSL.cmake cmake: tidy up more in Find modules 2024-08-18 22:53:09 +02:00
FindZstd.cmake cmake: tidy up more in Find modules 2024-08-18 22:53:09 +02:00
Macros.cmake cmake: drop redundant zlib var, rename function (internals) 2024-09-19 12:56:22 +02:00
OtherTests.cmake select: use poll() if existing, avoid poll() with no sockets 2024-10-01 15:11:50 +02:00
PickyWarnings.cmake build: fix possible -Wformat-overflow in lib557 with test bundle builds 2024-09-23 11:52:55 +02:00
Utilities.cmake