On 2/18/2015 10:43 PM, Jon wrote:

I have tested this on multiple occasions with the same error but yet things continue to work. Is this a documented benign error and/or can I ignore it? Or does it signal something more serious? Am I missing a setup call?



Also it occurs to me you're calling curl_global_init and curl_global_cleanup multiple times. Neither one of those is thread safe. Call init once at the start and cleanup once at the end. If you aren't sure of the end you could use atexit right after you call global_init like this
main(argc, argv) {
    if(curl_global_init(CURL_GLOBAL_ALL)) {
fprintf(stderr, "Fatal: The initialization of libcurl has failed.\n");
        return EXIT_FAILURE;
    }
    if(atexit(curl_global_cleanup)) {
fprintf(stderr, "Fatal: atexit failed to register curl_global_cleanup.\n");
        curl_global_cleanup();
        return EXIT_FAILURE;
    }
    your code
}

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to