cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Curl ftp fails with select error: 4 (EINTR)

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

Hi

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.

I solved the problem (I think) by using sigprocmask() to block SIGALRM
before the call to curl_easy_perform() and then unblocking it afterwards.

Renate

Daniel Stenberg wrote:
> On Wed, 10 Dec 2003, Kamesh Chitti wrote:
>
>
>>I am using the curl c library in one of my applications to ftp data to a
>>remote server. Once in a while,
>>curl_easy_perform fails with select error 4 (EINTR). I tracked down the
>>code to Curl_GetFTPResponse in ftp.c.
>
>
> What do you mean it fails with "select error 4"? Are you saying that select()
> fails and errno is set? If so, why does this happen? I was pretty confident we
> only needed to check for the EINTR case when we read the response, not for
> select() itself.
>
>
>>I was wondering why not just continue if errno == EINTR (or EAGAIN for that
>>matter) instead of returning an error.
>
>
> When/where?
>

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