cURL / Mailing Lists / curl-library / Single Mail


curl_easy_perform opens up new shell

From: Florian Wege <>
Date: Fri, 30 Oct 2015 21:18:34 +0100


I am working on a small GUI application (wxWidgets) for Windows which
downloads files from a web server using libcurl. While the GUI framework
shows no terminal, everytime the curl_easy_perform function does its job
(in a separate thread), it opens up such shell for a split second. Since a
lot of files need to be transfered consecutively, it results in a
flickering and focus-grabbing annoyance -> users cannot control the GUI
properly anymore.

How to prevent libcurl from spawning shells?


    m_curl = curl_easy_init();

    curl_easy_setopt(m_curl, CURLOPT_URL, url.c_str());
    curl_easy_setopt(m_curl, CURLOPT_WRITEFUNCTION, write_string);

    curl_easy_setopt(m_curl, CURLOPT_WRITEDATA, target);
    curl_easy_setopt(m_curl, CURLOPT_FAILONERROR, true);

    CURLcode res = curl_easy_perform(m_curl);

List admin:
Received on 2015-10-30