http://www.perlmonks.org?node_id=529338


in reply to how to keep tracking the system command in cgi

If the user clicks the Stop button it will not stop the CGI script from running - it just stops the browser waiting for a reply from the webserver.

Once the CGI program is launched it's launched, it doesn't sit there waiting to see if the client still wants an answer - it just goes away and does its job and hands the results back to the webserver to pass back to the client when it's done.

There isn't any way for the user to stop the script from running - short of making another script specially for killing the first script (or some such functionality added to the first script).

  • Comment on Re: how to keep tracking the system command in cgi

Replies are listed 'Best First'.
Re^2: how to keep tracking the system command in cgi
by misterb101 (Sexton) on Feb 10, 2006 at 14:31 UTC
    Well there is a way of doing this (there's always a way of doing it! ;) But this would involve forking off the installation process and using IPC or another method to communicate with the forked process.
    Is this what you are looking for? if so, consult the 'perldoc perlfork' page. There is however a limitation when used on a non-linux system like windows that doesn't support the fork system call.

    Good luck!
    Cheers,

    Rob