cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLE_RECV_ERROR and SIGPIPE

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Fri, 16 Apr 2004 13:44:02 +0200 (CEST)

On Fri, 16 Apr 2004, J.J.Green wrote:

> Im having a bit of a problem with an application Ive written, which
> occasionally fails with an "FTP response reading failed" from
> curl_easy_perform().

And the server are providing a nice and clean FTP command response?

> Schlepping through ftp.c I see that this occurs when Curl_read() sets the
> gotbytes variable to a negative value in Curl_GetFTPResponse(). I also get a
> SIGPIPE (not yet trapped so crashes the app) presumably raised somewhere in
> Curl_read().

Actually, we're trying to avoid the SIGPIPE signal by using MSG_NOSIGNAL on
platforms that have it. If you are using such a platform, then we've failed...

> I wonder if someone could explain what is happening here? It sounds like
> libcurl is trying to talk to another process to ask for data, but fails to
> send anything through a pipe it has set up for the purpose. Any ideas as to
> what could be causing this?

SIGPIPE is raised when the other end disappears on stream sockets.

-- 
     Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
      Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-04-16