curl_global_init.3: Separate the Windows loader lock warning

This is a slight correction of the parent commit which implied the
loader lock warning only applied if not thread-safe. In fact the loader
lock warning applies either way.

Ref: https://github.com/curl/curl/pull/8972#discussion_r891987030
This commit is contained in:
Jay Satiro 2022-06-08 03:02:51 -04:00
parent ba47566863
commit ae8a329e81

View File

@ -53,9 +53,11 @@ thread in the program (i.e. a thread sharing the same memory) is running.
This does not just mean no other thread that is using libcurl. Because
\fIcurl_global_init(3)\fP calls functions of other libraries that are
similarly thread unsafe, it could conflict with any other thread that uses
these other libraries. If you are initializing libcurl from a Windows DLL you
should not initialize it from DllMain or a static initializer because Windows
holds the loader lock during that time and it could cause a deadlock.
these other libraries.
If you are initializing libcurl from a Windows DLL you should not initialize it
from DllMain or a static initializer because Windows holds the loader lock
during that time and it could cause a deadlock.
See the description in \fIlibcurl(3)\fP of global environment requirements for
details of how to use this function.