You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Dietz, Phil E." <PE...@west.com> on 2003/01/30 18:17:31 UTC

CGI brigades

I just read this:
 
    * pipes deadlock on all platforms with limited pipe buffers (e.g. both
      Linux and Win32, as opposed to only Win32 on 1.3).  The right solution
      is either GStein's proposal for a "CGI Brigade", or OtherBill's proposal
      for "Poll Buckets" for "Polling Filter Chains".  Or maybe both :-)

 
I imagine this is in regards to stderr and stdout contending at the same time.
 
What if mod_cgi registered as output filter (the 1st one)...
and all that filter did was :
   - read from the pipe bucket, convert it to a heap bucket, and passed it on to the other output filters.....
   - stderr is read in and discarded...
 
Would this solve any of the issues ?
 

Re: CGI brigades

Posted by Greg Ames <gr...@apache.org>.
Dietz, Phil E. wrote:
> I just read this:
>  
>     * pipes deadlock on all platforms with limited pipe buffers (e.g. both
>       Linux and Win32, as opposed to only Win32 on 1.3).  The right solution
>       is either GStein's proposal for a "CGI Brigade", or OtherBill's proposal
>       for "Poll Buckets" for "Polling Filter Chains".  Or maybe both :-)
> 
>  
> I imagine this is in regards to stderr and stdout contending at the same time.
>  
> What if mod_cgi registered as output filter (the 1st one)...
> and all that filter did was :
>    - read from the pipe bucket, convert it to a heap bucket, and passed it on to the other output filters.....
>    - stderr is read in and discarded...
>  
> Would this solve any of the issues ?

I don't see how it would if the CGI chooses writes to the stderr pipe until it 
blocks.  I believe mod_cgi would be blocked on the stdout pipe read.  If all the 
pipe reads in mod_cgi are made non-blocking, then we need some way to prevent 
busy wait loops.

Greg