See forking in a cgi script, which asks a very similar question.
In reply to Re: How to run a process in background? by kyle in thread How to run a process in background? by advait