Is it possible to launch a long process and return a page before it's finished, preferrably in Perl? (Windows platform, IIS + frontpage extensions). Thanks!
You might take a look at the 'exec' function. It starts a new process and immediately dies. The new process goes on it's way doing whatever. You would need to complete all of the HTML output prior to doing the 'exec'.
Code:
#!/usr/local/bin/perl
use CGI;
$| = 1; # set autoflush to 'on'
my $object = new CGI;
print $object->header,
$object->start_html,
"<p>Starting the new processes shortly</p>",
$object->end_html;
exec "system_command, @args";
That would print a very simple html page and then fire whatever system_command you indicated.
See 'perldoc exec' from a command prompt to get details on 'exec'. 'hope this helps
If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.