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).