jiesheng zhang wrote:
Hi
I am try to run something like this in my cgi.
-------------------------------------
system ("sleep 3000 &");
-----------------------------------
Since, it is time-consuming task, I let it run in background and immediately return to user. I tested this script. It was no problem for a standalone perl script. However, once I had this script in a perl cgi. The script seemed not to have this system command run in background. It waited there for the child process to finish.
Any clue for why it behaved like that? How can I for a child process in background and return immediately to the web user?


Help is really appreciated!

jiesheng, please take a look at: http://perl.apache.org/docs/1.0/guide/performance.html#Forking_and_Executing_Subprocesses_from_mod_perl it explains how to do this sort of things.

--
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Reply via email to