curl-curl/scripts
Stefan Eissing 88fc6c491f
threaded-resolver: fix shutdown
Changed strategy to start up and terminate resolver thread.

When starting up:

Start the thread with mutex acquired, wait for signal from thread that
it started and has incremented the ref counter. Thread set
pthread_cancel() to disabled before that and only enables cancelling
during resolving itself. This assure that the ref counter is correct and
the unlinking of the resolve context always happens.

When shutting down resolving:

If ref counting shows thread has finished, join it, free everything. If
thread has not finished, try pthread_cancel() (non Windows), but keep
the thread handle around.

When destroying resolving:

Shutdown first, then, if the thread is still there and 'quick_exit' is
not set, join it and free everything. This might occur a delay if
getaddrinfo() hangs and cannot be interrupted by pthread_cancel().

Destroying resolving happens when another resolve is started on an
easy handle or when the easy handle is closed.

Add test795 to check that connect timeout triggers correctly
when resolving is delayed. Add debug env var `CURL_DNS_DELAY_MS`
to simulate delays in resolving.

Fix test1557 to set `quick_exit` and use `xxx.invalid` as domain
instead of `nothing` that was leading to hangers in CI.

Closes #18263
2025-08-21 09:26:49 +02:00
..
cd2cd scripts: enable strict warnings in Perl where missing, fix fallouts 2025-07-27 22:35:18 +02:00
cd2nroff misc: fix typos 2025-07-12 08:59:44 +02:00
cdall scripts: enable strict warnings in Perl where missing, fix fallouts 2025-07-27 22:35:18 +02:00
checksrc-all.pl checksrc-all: rewrite in Perl, remove checksrc.bat 2025-07-11 12:28:46 +02:00
checksrc.pl tidy-up: whitespace (more in Perl) 2025-07-12 08:59:44 +02:00
ciconfig.pl scripts: enable strict warnings in Perl where missing, fix fallouts 2025-07-27 22:35:18 +02:00
cijobs.pl scripts: enable strict warnings in Perl where missing, fix fallouts 2025-07-27 22:35:18 +02:00
cmakelint.sh GHA: minor tidy-ups 2025-07-13 11:52:08 +02:00
CMakeLists.txt cmake: install shell completions for cross-builds 2025-04-24 10:04:17 +02:00
completion.pl tidy-up: whitespace (more in Perl) 2025-07-12 08:59:44 +02:00
contributors.sh contributors.sh: lowercase 'github' for consistency 2025-02-24 08:05:06 +01:00
contrithanks.sh contrithanks: fix for BSD sed tool 2025-07-28 17:29:26 +02:00
coverage.sh GHA: add shellcheck job and fix warnings, shell tidy-ups 2024-04-08 09:37:24 +00:00
delta delta: fix counters 2025-07-29 09:45:07 +02:00
dmaketgz dmaketgz: use --no-cache when building docker image 2024-12-05 15:41:53 +01:00
extract-unit-protos scripts: enable strict warnings in Perl where missing, fix fallouts 2025-07-27 22:35:18 +02:00
firefox-db2pem.sh firefox-db2pem: avoid use of eval in script 2025-06-28 21:12:27 -07:00
installcheck.sh GHA: add shellcheck job and fix warnings, shell tidy-ups 2024-04-08 09:37:24 +00:00
Makefile.am configure: if no perl, disable unity and shell completion, related tidy ups 2025-08-04 14:55:10 +02:00
maketgz Makefile.dist: delete 2025-01-27 20:59:47 +01:00
managen managen: reset text mode at end of table marker 2025-08-01 23:24:32 +02:00
mdlinkcheck scripts: enable strict warnings in Perl where missing, fix fallouts 2025-07-27 22:35:18 +02:00
mk-ca-bundle.pl tidy-up: whitespace (more in Perl) 2025-07-12 08:59:44 +02:00
mk-unity.pl cmake: replace the way clang-tidy verifies tests, fix issues found 2025-06-22 23:08:46 +02:00
nroff2cd scripts: enable strict warnings in Perl where missing, fix fallouts 2025-07-27 22:35:18 +02:00
pythonlint.sh scripts: move the ruff linter command into a script 2025-05-13 16:41:32 -07:00
randdisable scripts: enable strict warnings in Perl where missing, fix fallouts 2025-07-27 22:35:18 +02:00
release-notes.pl release-notes: fix warning 2025-08-01 16:02:54 +02:00
release-tools.sh maketgz: fix RELEASE-TOOLS.md for daily tarballs 2024-09-07 09:33:09 -07:00
schemetable.c tidy-up: prefer ifdef/ifndef for single checks 2025-07-27 22:35:17 +02:00
singleuse.pl threaded-resolver: fix shutdown 2025-08-21 09:26:49 +02:00
top-complexity top-complexity: set cutoff level to 80 2025-07-30 09:13:50 +02:00
verify-release configure: fail if PSL is not disabled but not found 2024-08-05 08:33:58 +02:00
wcurl wcurl: update to v2025.05.26 2025-05-27 09:29:43 +02:00