You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Roy T. Fielding" <fi...@kiwi.ics.uci.edu> on 1998/08/21 21:11:10 UTC

Re: Spinning httpds - One Solution

>The issue is why you don't get a SIGPIPE when writing which would result
>in timout() longjmping out of your code completely.

SIGPIPE is unreliable -- Solaris 2.5 doesn't even generate one when
writing to a closed socket.  We really should be ignoring it everywhere
and just using the return code to detect an error.  That was the case
for the core code last I checked.  mod_php should be checking the return
code for an error.

....Roy

Re: Spinning httpds - One Solution

Posted by Dean Gaudet <dg...@arctic.org>.
Ok the moment is up.

Dean

On Tue, 25 Aug 1998, Alexei Kosut wrote:

> On Tue, 25 Aug 1998, Ben Laurie wrote:
> 
> > > (Hello C++ers, yeah I'd like exceptions.  Too bad that's one of the least
> > > portable parts of the standard.)
> > 
> > I'll admit - even I avoid exceptions.
> 
> Well, there's one argument for switching the entire project over to Java.
> Working exceptions :)
> 
> Actually, with the bytecode-to-native translators/compilers out there, and
> HotSpot coming Real Soon Now, this might be something worth thinking
> about, if only for a moment or two.
> 
> -- Alexei Kosut <ak...@stanford.edu> <http://www.stanford.edu/~akosut/>
>    Stanford University, Class of 2001 * Apache <http://www.apache.org> *
> 
> 
> 


Re: Spinning httpds - One Solution

Posted by Alexei Kosut <ak...@leland.Stanford.EDU>.
On Tue, 25 Aug 1998, Ben Laurie wrote:

> > (Hello C++ers, yeah I'd like exceptions.  Too bad that's one of the least
> > portable parts of the standard.)
> 
> I'll admit - even I avoid exceptions.

Well, there's one argument for switching the entire project over to Java.
Working exceptions :)

Actually, with the bytecode-to-native translators/compilers out there, and
HotSpot coming Real Soon Now, this might be something worth thinking
about, if only for a moment or two.

-- Alexei Kosut <ak...@stanford.edu> <http://www.stanford.edu/~akosut/>
   Stanford University, Class of 2001 * Apache <http://www.apache.org> *



Re: Spinning httpds - One Solution

Posted by Ben Laurie <be...@algroup.co.uk>.
Dean Gaudet wrote:
> 
> On Fri, 21 Aug 1998, Marc Slemko wrote:
> 
> > Yea, and this has to be dealt with for threaded versions anyway
> > (<!--#include dean="apache-nspr-does-this" -->).
> 
> Hmm.  Actually it may or may not, it will do it if the core already did
> it.  I didn't put any extra effort into checking the result codes of write
> operations.  I did remove the SIGPIPE handler though, it's not relevant.
> There's no out-of-line handling of client errors, everything is inline.
> (Hello C++ers, yeah I'd like exceptions.  Too bad that's one of the least
> portable parts of the standard.)

I'll admit - even I avoid exceptions.

Cheers,

Ben.

-- 
Ben Laurie            |Phone: +44 (181) 735 0686| Apache Group member
Freelance Consultant  |Fax:   +44 (181) 735 0689|http://www.apache.org/
and Technical Director|Email: ben@algroup.co.uk |
A.L. Digital Ltd,     |Apache-SSL author     http://www.apache-ssl.org/
London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache/

WE'RE RECRUITING! http://www.aldigital.co.uk/recruit/

Re: Spinning httpds - One Solution

Posted by Rasmus Lerdorf <ra...@lerdorf.on.ca>.
> (Hello C++ers, yeah I'd like exceptions.  Too bad that's one of the least
> portable parts of the standard.) 

;)  You keep sticking it to them.  Someone is going to make you eat a C++
book one day.

-Rasmus


Re: Spinning httpds - One Solution

Posted by Dean Gaudet <dg...@arctic.org>.

On Fri, 21 Aug 1998, Marc Slemko wrote:

> Yea, and this has to be dealt with for threaded versions anyway
> (<!--#include dean="apache-nspr-does-this" -->).

Hmm.  Actually it may or may not, it will do it if the core already did
it.  I didn't put any extra effort into checking the result codes of write
operations.  I did remove the SIGPIPE handler though, it's not relevant. 
There's no out-of-line handling of client errors, everything is inline.
(Hello C++ers, yeah I'd like exceptions.  Too bad that's one of the least
portable parts of the standard.) 

Dean


Re: Spinning httpds - One Solution

Posted by Marc Slemko <ma...@znep.com>.

On Fri, 21 Aug 1998, Roy T. Fielding wrote:

> >The issue is why you don't get a SIGPIPE when writing which would result
> >in timout() longjmping out of your code completely.
> 
> SIGPIPE is unreliable -- Solaris 2.5 doesn't even generate one when
> writing to a closed socket.  We really should be ignoring it everywhere

You shouldn't get one while writing to a closed socket, should you?  You
should only get one when write()s end up sending data and getting a RST
back.

> and just using the return code to detect an error.  That was the case
> for the core code last I checked.  mod_php should be checking the return
> code for an error.

Yea, and this has to be dealt with for threaded versions anyway
(<!--#include dean="apache-nspr-does-this" -->).

It is just nice to have notification that can have it dealt with without
each and every module having to do its own handling all the way down the
chain and being able to exit all the way up.