httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chuck Murcko <>
Subject Re: [PATCH] Handle write errors when no SIGPIPE
Date Sun, 27 Apr 1997 01:06:36 GMT
Roy T. Fielding wrote:
> In message <>, Nathan J Kurz writes:
> >One would think that when you pushed Stop on the browser the script
> >would get a SIGPIPE and die as soon as a buffer was filled and
> >written.  Unfortunately, on Solaris 2.5.1 it doesn't ever get that
> >signal.  Even if you press Stop immediately, until the server Timeout
> >is reached send_fd_length() keeps trying to throw away input as fast
> >as your processor will run:
> >
> >23864 nate     -25    0 2008K 1680K run     3:27 62.73% 62.73% long_push
> >23797 nate     -15    0 1744K 1304K sleep   1:54 35.22% 35.04% httpd
> >
> >So while Sameer's CGI patch might help in some circumstances, and
> >while this is probably a Solaris bug, and while there probably aren't
> >many CGI's that work like this, it might be worth revisiting the error
> >handling in send_fd_length() when bwrite() returns a -1 and errno is
> >not EAGAIN. :)
> Nathan's comments caused me to revisit the code that I had stared at
> for so long looking for an EPIPE.  I don't know why I missed it the first
> time, but the below patch will fix this problem.  Note that it is needed
> for all systems, since our current code will silently toss data if an
> interim write fails for any reason (very bad).  It will also be a huge
> load reducer for sites sending large messages to impatient users.
Chuck Murcko
The Topsail Group, West Chester PA USA

View raw message