www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Heiko Marschall ...@garmisch.net>
Subject mod_cgi/2240: CGI killed 3 seconds after loosing client
Date Sun, 17 May 1998 11:12:05 GMT

>Number:         2240
>Category:       mod_cgi
>Synopsis:       CGI killed 3 seconds after loosing client
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          support
>Submitter-Id:   apache
>Arrival-Date:   Sun May 17 04:20:00 PDT 1998
>Originator:     hm@garmisch.net
>Release:        1.3b6
linux 2.0.32 
When loosing connection to the browser, my cgi-script gets a TERM-signal.
But when I go on executing the script (e.g. by $SIG{TERM}=SIG_IGN) the script
aborts after about 3 seconds. But I receive no more signal (maybe an KILL ?) to
handle with.
This behavior is independent from writing to the browser, even writing to disk
after receiving the TERM-signal doesn´t help.
As you see in my example i tried to catch all the known signals.
Only KILL cannot be snatched. So i think Apache sends me an KILL signal ?

use Config;

sub handler
        local ($sig) = @_;
        open STDOUT,">afterterm.txt";
        for ($i=1; $i < 20; $i++)
                print STDOUT "test $i\n";
# breaks after 3 seconds !!!
        close STDOUT;

foreach (@sigs)



open SIG, ">sig.test";
select SIG; $|=1;
select STDOUT;

print "Content-type: text/html\n\n";
print "<html><body>\n";
for ($i=0; $i< 20; $i++)
        print "zahl:$i<br>\n";  # writing to browser
        print SIG "zahl:$i<br>\n";  # writing to disk
        sleep (1);
close SIG;

[In order for any reply to be added to the PR database, ]
[you need to include <apbugs@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]

View raw message