tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remy Maucherat <>
Subject Re: cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets
Date Tue, 27 Aug 2002 08:03:59 GMT wrote:
> amyroh      2002/08/26 15:38:35
>   Modified:    catalina/src/share/org/apache/catalina/servlets
>   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 (

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 ?


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message