Kurt George Gjerde wrote:
Hi,

In mod_perl 2 under MPM (win32), is there a way of returning the request
to the client (browser) and having the script continue doing other
(time consuming) operations (without the client having to wait).

Under mp1/linux I guess I could fork but how can I do this on win32?

A typical example could be to receive a file upload, return OK to the
client, and then convert the file to some other format(s).

It's not any different under mod_perl 2.0, than it is under mod_perl 1.0.


Either you fork (which I think should work on win32, where fork is emulated by perl, no?) and detach as explained here:
http://perl.apache.org/docs/1.0/guide/performance.html#Forking_and_Executing_Subprocesses_from_mod_perl


or you register a cleanup handler, which will keep your mod_perl process unavailable for serving other requests while it's busy:
http://perl.apache.org/docs/2.0/user/compat/compat.html#C__r_E_gt_register_cleanup_
but this should work everywhere, if you have a problem with fork.


__________________________________________________________________
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