cURL / Mailing Lists / curl-users / Single Mail

curl-users

SIGTERM signal interrupt

From: <miniko_at_gmx.net>
Date: Wed, 10 Feb 2010 11:51:52 +0100

Hi,
I have a huge problem with my program that uses many Curl handles. Each Curl handel used in his own thread and runs in an infinite loop.

My code in the threads that concern the curl handle:
----------------------------------------------------------------
CURL *curl;
CURLcode result;

curl = curl_easy_init();

if(curl){
        curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errorBuffer);
        curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
        curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 15);
        curl_easy_setopt(curl, CURLOPT_TIMEOUT, 15);
        curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
        curl_easy_setopt(curl, CURLOPT_URL, url_string.c_str());
        curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
        curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, mywriter);
        curl_easy_setopt(curl, CURLOPT_WRITEDATA, &buffer);
        curl_easy_setopt(curl, CURLOPT_POSTFIELDS, request.c_str());
        try{
                result = curl_easy_perform(curl); //OK
        }
        catch(...){
        ...
        }
        curl_easy_cleanup(curl);

        if(result == CURLE_OK){
                return buffer;
        }
        else{
                return "Error Curl";
        }
}
----------------------------------------------------------------
Before I create the threads I called the 'curl_global_init(CURL_GLOBAL_ALL)' function.
All things seems ok and the program runs, but after a while it was interrupted by an SIGTERM signal.
----------------------------------------------------------------
Program received signal SIGTERM, Terminated.
[Switching to Thread 7176 (LWP 1417)]
0x0fd236cc in umount2 () from /lib/libc.so.6
(gdb) bt
#0 0x0fd236cc in umount2 () from /lib/libc.so.6
#1 0x0fd1b7cc in poll () from /lib/libc.so.6
#2 0x10065db0 in ?? ()
----------------------------------------------------------------
Is it possible that the SIGTERM signal depends on things that are done in the curl lib?
My operating system is linux and I was working on an powerpc 405 platform.

Please help me
thanks
Miniko

-- 
NEU: Mit GMX DSL über 1000,- ¿ sparen!
http://portal.gmx.net/de/go/dsl02
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-02-10