At 08:43 AM 02/12/01 +0800, Stas Bekman wrote:
>> What happens to the 54 earlier processes, since I submitted the request
55 times? How do Apache & mod_perl handle the processes to nowhere?
>
>They get aborted the first moment they try to send some output (or read
>input if they didn't finish yet) and after that get aborted as they
>realize that the connection to the socket is dead. See:
>http://perl.apache.org/guide/debug.html#Handling_the_User_pressed_Stop_

I thought one has to explicitly check for the aborted connection in >=
1.3.5 -- like you explain in the section in the Guide following the one you
cited.  Isn't $r->print a noop after an aborted connection?

Which gives me a chance to ask an off topic question about this very topic:

As this arrived at in my inbox I was debugging a pair of old CGI scripts.
Both are very similar and use common modules for most everything -- one is
the public script and the other is the admin script for maintenance and
data entry.    Both CGI.

Both scripts use a common module for logging and DBM file opening and
closing.  Really, the only difference is the form processing for the two
scripts. 

The DBM close is in an END block, and the END block also writes a
"Transaction Done" message to STDERR (STDERR is dup'ed to a log file I use
for locking before at the start of every request the DBM files -- very low
traffic script).

Hitting stop on the public script has no effect -- just like I'd expect for
1.3.12 -- it keeps running even when generating a long-ish output.

But hitting stop on the admin script aborts every time.  I have $SIG{PIPE}
= sub { print STDERR "$$ caught sigpipe" exit } in the common module and it
prints the error when I hit stop on the admin script.

Nothing is noted in the apache logs about broken pipes.

I'm scratching my head at this point.  Any ideas what to look for?


Bill Moseley
mailto:[EMAIL PROTECTED]

Reply via email to