]> git.ipfire.org Git - thirdparty/curl.git/commit
thread: errno on thread creation
authorStefan Eissing <stefan@eissing.org>
Fri, 10 Oct 2025 08:15:38 +0000 (10:15 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 10 Oct 2025 21:48:11 +0000 (23:48 +0200)
commit03448f477a0cfa3868dfd15a7b9278dcecf944a2
tree601d6874f59597e979d6a76059fed5eab96c8dfc
parentbf41be6292cf712315815c722aab2653a0ec827f
thread: errno on thread creation

When thread creation fails, the code uses `errno` to remember the cause.
But pthread_create() never sets errno and gives the error as return value.
Fix that by setting the return value into errno on failure.

Windows: I think the ifdef was the wrong way around. Also set a generic
Windows Error code on CE systems.

Reported-by: Joshua Rogers
Closes #18998
lib/curl_threads.c