Bug 28816

Summary: CGI programs will not detach unless STDERR is also closed
Product: Apache httpd-2 Reporter: Russell Miller <rmiller>
Component: CoreAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: CLOSED DUPLICATE    
Severity: normal    
Priority: P3    
Version: 2.0.49   
Target Milestone: ---   
Hardware: All   
OS: Linux   

Description Russell Miller 2004-05-06 18:30:47 UTC
I encountered this problem last night and don't have an explanation for it. 
 
We have a CGI program which is meant to send a response back to the user, 
close stdout, and then continue processing.  These processes can take many 
hours, and we wish the user to have immediate confirmation.  We also find it 
very useful to send the stderr output of these programs to the apache error 
log.  This worked perfectly under 1.3.24, and appears to no longer work under 
2.0.49. 
 
It appears that apache will no longer close the connection to the browser 
unless stderr is also closed by the detaching program.  This, of course, makes 
it impossible for us to send errors through the apache logging facility.  We 
were able to work around this by sending the errors elsewhere, but it's a very 
subtle change that proved very difficult to track down. 
 
Thanks. 
 
--Russell
Comment 1 Jeff Trawick 2004-05-06 19:20:31 UTC
See latest update from Joe Orton to PR 22030 for code to try.

*** This bug has been marked as a duplicate of 22030 ***