httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <>
Subject Behavior of long-running CGI scripts?
Date Sun, 19 Dec 2004 07:40:03 GMT
What is *supposed* to be the behavior of long-running CGI scripts that have 
their connections closed on them before they complete?  Are they supposed to 
finish, or abort prematurely?  Do they receive some signal when the parent 
closes its handle?

With httpd-2.1, if I add the following to the end of the test-cgi script:

echo "--`date`--" >> /tmp/this-is-a-test
sleep 300
echo "Hello World"
echo "Hello" >> /tmp/this-is-a-test
echo "--`date`--" >> /tmp/this-is-a-test

Then, I issue a HTTP request for /cgi-bin/test-cgi and then close the 
connection before the sleep expires.  I will *not* see the Hello or final date 
in my log, but I do see the first date.  If I lower the value to be less than 
300 seconds (300 is the default server Timeout), it's okay and I see the 
'right' output.

The reason I'm asking this is that if this analysis is correct, then I think 
we're seeing some brokenness on due to this behavior.  -- justin

View raw message