tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remy Maucherat <r...@apache.org>
Subject Re: cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets CGIServlet.java
Date Tue, 27 Aug 2002 08:03:59 GMT
amyroh@apache.org wrote:
> amyroh      2002/08/26 15:38:35
> 
>   Modified:    catalina/src/share/org/apache/catalina/servlets
>                         CGIServlet.java
>   Log:
>   CGIServlet had problems in the case of a CGI script which prints a large
>   amount of data to stdout; while the CGIServlet was waiting for the end of
>   stderr, the CGI script would fill up the stdout buffer and then wait for it to be
>   drained, causing a deadlock between the two processes.
>   
>   This patch solves this problem by having a single loop which
>   reads stderr if it's ready, or stdout if ready.  If neither handle has queued
>   data and the CGI script has exited, the servlet pauses a couple of times for
>   half a second to make sure that all output has been delivered, then it exits.
>   
>   Fixes Bug 12041.  Patch submitted by Dave Glowacki (dglo@ssec.wisc.edu)

I saw that patch, and wasn't happy about it, as it introduces some 
randomness in the script execution. Maybe it works fine, though, but it 
did look suspicious. Did you test it before applying it ?

Could a CGI servlet expert comment on it ?

Thanks,
Remy


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message