locomac has asked for the wisdom of the Perl Monks concerning the following question:
How do I start an independant process from a Perl script? I am trying to do a web page that launches a DB search from an input file. I want to do some processing, let the user know via the web page that I got the file and I am going to process it, start a brand new independant process that will actually process the file (this part doesn't communicate with the parent) and end the parent. I have tried exec, fork, open and system, but they all wind up waiting for the second program to finish.
The second program processes the input file and mails the results back to the requestor. The problem with waiting is that the files to be processed are large and take a long time to run, which sometimes causes a timeout on the web server, and always upsets the user.