I'm working on a cgi script that basically, upon running it, runs a
separate script in the background, and displays a message saying
"Script is running.  Should be done soon." on the web browser and...
that's it.  The browser can be closed, and the script will continue to
run in the background.  Here's the jest of what I have, but... The
problem is that it doesn't work.  When you run it, it does a system()
call to run the script, and then waits for completion, where it then
displays "Script is running.  Should be done soon.".  I tried using
exec() instead but that didn't work either.  Also tried adding & to the
end of the command, didn't help.

#!/usr/bin/perl
use strict;
use CGI qw(:cgi-lib :cgi :html2);
$SIG{CHLD}='IGNORE';
my $pid=fork();
if($pid) {
    system "/www/scripts/process_list.pl";   # Run script in background
} else {
    # Print confirmation script to browser, that's it
    print header."<html><body>Script is running.  Should be done
soon.</body></html>";
}

Any ideas on how to make this work properly?? This is running on Solaris 8 with apache, if it matters at all. Thanks


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to