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: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Thu, 11 Dec 2003 23:42:56 +0100 (CET)

On Thu, 11 Dec 2003, Renate Bahnemann wrote:

> 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 doesn't.

> 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.

If CURLOPT_NOSIGNAL is not set, and you use a timeout or a connection timeout,
then libcurl will use alarm() itself to time-out the name lookup. But after
the lookup, the previous alarm() will be restored so the parent application
should still get its SIGALRM as expected.

-- 
    Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
   [[ Do not send mails to this email address. They won't reach me. ]]
-------------------------------------------------------
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-12