cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libCURL crash in __libc_res_nquery ()

From: Michael Wood <esiotrot_at_gmail.com>
Date: Sun, 28 Mar 2010 15:25:12 +0200

On 28 March 2010 14:50, Kamil Dudka <kdudka_at_redhat.com> wrote:
> On Sunday 28 of March 2010 14:36:38 Kamil Dudka wrote:
>> On Sunday 28 of March 2010 10:21:20 souvik.datta_at_wipro.com wrote:
>> > Thanks for your reply. I have added the patch as mentioned in the link ,
>> > but this time I find that it is failing (very frequently ) by throwing
>> > the print "Alarm clock" on the console.
>>
>> AFAIK there is no such message in libcurl sources.  You will need to check
>> your appliction.
>
> The message may be printed by the shell.  Does your application set its own
> handler for SIGALRM?  If so, it clashes with the libcurl's handler.  libcurl
> removes the original handler and the signal comes unhadled, causing the
> application to crash.

Maybe he's using sleep(3)?

From the man page:

BUGS
       sleep() may be implemented using SIGALRM; mixing calls to alarm(2) and
       sleep() is a bad idea.

       Using longjmp(3) from a signal handler or modifying the handling of
       SIGALRM while sleeping will cause undefined results.

-- 
Michael Wood <esiotrot_at_gmail.com>
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-03-28