gnurl_global_cleanup(3)
π¦ gnurl_global_cleanup(3) π¦
okay so this page is from the libgnurl Manual, and it's literally your guide to curl_global_cleanup β the βwe're done here, clean up your messβ function π
β¨
π NAME π
curl_global_cleanup β global libcurl cleanup, no cap π§Ήπ
β¨ SYNOPSIS β¨
#include <gnurl/curl.h>
void curl_global_cleanup(void);
π DESCRIPTION π
bestie, this function releases resources acquired by curl_global_init(3). that's the whole vibe: it's the cleanup era π§Όπ«Ά
You should call curl_global_cleanup(3) once for each call you make to curl_global_init(3), after you are done using libcurl. one init, one cleanup β matching set, periodt π
β οΈ thread-safety warning, bestie β οΈ This function is not thread safe. You must not call it when any other thread in the program (i.e. a thread sharing the same memory) is running.
and no, that doesnβt just mean no other thread that is using libcurl π This doesn't just mean no other thread that is using libcurl. Because curl_global_cleanup(3) calls functions of other libraries that are similarly thread unsafe, it could conflict with any other thread that uses these other libraries. so yeah, the whole program needs to be chill before you hit this π
See the description in libcurl(3) of global environment requirements for details of how to use this function. fr fr, go read that if you want the full lore ππ
π¨ CAUTION π¨
curl_global_cleanup(3) does not block waiting for any libcurl-created threads to terminate (such as threads used for name resolving). like, it is not gonna sit there and wait for them to finish β it's not that kind of function π
If a module containing libcurl is dynamically unloaded while libcurl-created threads are still running then your program may crash or other corruption may occur. and we are not trying to have corruption today, bestie ππ
We recommend you do not run libcurl from any module that may be unloaded dynamically. This behavior may be addressed in the future. so for now, keep libcurl in a module that stays put, okay? π«Άβ¨
π«Ά SEE ALSO π«Ά
(yes, the original list ends with a lil trailing comma after libcurl-thread(3), β we keep the details exactly as they are, iykyk π
)
mwah π β cute little footer sign-off: this iconic page is libcurl 7.8, dated 17 Feb 2006 πβ
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms