Hi I have a perl script (Cgi / Apache / Windows) which executes some programs on the computer, and formats the output for the web. The script takes about 4-5 minutes to completely run.
My problem is that when someone cancels page load (or closes the web browser) while the script is running, the perl process in the server will keep running without doing anything, and keeps the lock on all open files so another script cannot run. The process will never end, and I have to use "End process tree" to end perl.exe and the started subprocesses to be able to re-run the script.
How can I make sure the script will not die like this? (If the script continues to run in the background, and 'quit' when done, it's the best solution)