cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Broken Pipe

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 7 Apr 2001 20:26:34 +0200 (MET DST)

On Fri, 6 Apr 2001, Craig Davison wrote:

> I've noticed that some HTTPS upload operations I do with libcurl fail with
> a "Broken Pipe" error (UNIX only).
>
> The error happens sometime during the execution of curl_easy_perform... I
> thought I'd post this here because I don't think writing "Broken Pipe" to
> standard out and exit()ing is the right way to handle an error, even
> unexpected cases.

What happens is that the receiving end stops reading. libcurl doesn't handle
the SIGPIPE signal that might be received when writing to a socket whose
reading end closed.

I do have a hard time making up my mind on how libcurl should deal with
signals, as I want libcurl to interfere as little as possible on the rest of
the application.

I believe that the shell is outputting that 'Broken Pipe' text.

> Any plans to fix this, or should I delve into highlevel.c and url.c
> myself and find the offending code?

This is rather a lack of signal ignoring. Feel free to provide code that adds
this ignore.

-- 
  Daniel Stenberg -- curl project maintainer -- http://curl.haxx.se/
Received on 2001-04-07