in reply to executing other scripts while printing a webpage
# print cgi response as usual, then... my $pid; if ($pid = fork) { # display run, so exit exit(0); } elsif (defined $pid) { # run script b function if $run_script_b true... if ($run_script_b) { script_B(); } } else { # raise an error coz the fork failed ... }
Works for me. My script starts an FTP install that can take up to half an hour to run, depending on network connection.
cLive ;-)
|
---|