cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Alarm Signal in Solaris Apps (Was: Re: Curl ftp fails with select error: 4

From: Renate Bahnemann <renate_at_micromuse.com>
Date: Thu, 11 Dec 2003 14:32:44 +0000

Hi

Holger Rauch wrote:
>
> On Thu, 11 Dec 2003, Renate Bahnemann wrote:
>
>
>>I had a similar problem on 7.10.7 a few weeks ago (on Solaris 8).
>>I traced the problem to a low-level system call in libcurl being
>>interrupted by an alarm signal that was coming from our application.
>
>
> Are you sure the alaram signal came from your application in the sense that
> it was generated by your application? I'm also experiencing alaram signals
> on Solaris 8 64 bit with a thread test program. Could this be a bug in the
> Solaris kernel and/or the Solaris pthread lib?
>
Our application is single threaded. It definately uses SIGALRM as part
of an unrelated polling function.

>
>>I solved the problem (I think) by using sigprocmask() to block SIGALRM
>>before the call to curl_easy_perform() and then unblocking it afterwards.
>
>
> Are you sure this is a real solution to the problem rather than a workaround
> to prevent the alaram signal from interrupting libcurl?
>

Dunno about it being the "real" solution but I wouldn't know what that
would be. LibCurl does allow for applications that use signals, by
providing the CURLOPT_NOSIGNAL option but I cannot see that it could
block the parent application's signals. It may well be that one does
want them to fire. In our case it is OK to suppress SIGALRM until the
url operation completed.

But I am open to any suggestions...

Regards
Renate

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
Received on 2003-12-11