httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <ma...@worldgate.com>
Subject Re: Spinning httpds - One Solution
Date Fri, 21 Aug 1998 04:42:32 GMT
On Fri, 21 Aug 1998, Rasmus Lerdorf wrote:

> > Erm... so how does that work if php3_restore_umask isn't called after a
> > hard timeout?
> > 
> > What do you think is "wrong" about your code?  
> > 
> > hard timeout --> gets the hell out when a timeout or SIGPIPE happens
> > soft timeout --> set r->connection->aborted when ...
> 
> Well, the only visible problem is that r->connection->aborted doesn't seem
> to get set when a client connection is broken no matter how much output I
> send followed by calls to rflush().  The script runs until completion, or
> until the internal PHP timeout expires. 

r->connection->aborted can and should never ever be set inside a
hard_timeout.

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

> 
> > Hmm.  Don't you set a SIGPIPE handler in mod_php in the above sequence? 
> 
> No, I have no SIGPIPE handler defined.  I basically followed
> mod_include's example when I initially figured out how to hook PHP into
> Apache.  Seen from the moon, mod_include and mod_php do the same thing.
> There is no signal handler in mod_include and its send_parsed_content()
> function is wrapper inside a hard timeout just like PHP's.

Oh, I was getting confused with functions/post.c where you ignore SIGPIPE.
That code looks copied from mod_cgi, and I don't see that you need to
ignore SIGPIPE in your code since you aren't writing to a CGI.


Mime
View raw message