Re: Broken Pipe

Gisle Aas (gisle@aas.no)
16 Oct 1997 11:05:12 +0200


Stephen Friedman <friedman@donald.phast.umass.edu> writes:

> All I'm doing is setting up a robot object and a request object and
> using simple_request. Nevertheless, I keep getting the occasional
> untrapped (and untrappable) "Broken Pipe" error, possibly on sites
> with Internet connection problems. I skimmed through the archives
> and found nothing mentioning 'broken pipe' errors. I am currently
> running libwww-perl-5.10 under perl 5.003 on a Sun Sparc 2 running
> Solaris 2.5.

This problem has been noted before on Solaris.  The problem is sites
that you can connect to, but after that the server just disconnects
and don't want to hear what the client has to say.  If a program write
to a closed socket, then it might get a SIGPIPE in return.

It sould be safe just to add

  $SIG{PIPE} = 'IGNORE';

to your application.

This problem will disappear with the HTTP/1.1 rewrite of LWP.

-- 
Gisle Aas