sparky8342 has asked for the wisdom of the Perl Monks concerning the following question:

Hello,

I've got a long running script that runs as a cgi file. It can take several minutes, or even hours.

What I'd like to do, is make the script halt when someone presses 'stop' on the browser, but this doesn't seem to have any effect.

I've tried:

use sigtrap qw(die PIPE);

sssuming that I should get a SIGPIPE, but the script just carries on running on the server.

Can anyone suggest what I can do here?

Thanks

Replies are listed 'Best First'.
Re: CGI script won't stop
by epoptai (Curate) on Jun 25, 2001 at 13:55 UTC
      Thanks, I was getting a feeling that you couldn't detect the stop button :)