P
Prachi
The purpose of this cgi script is to receive cgi parameters from a user
filled form and pass them along as command line parameters to another
perl script that should run the computation in the background. I used
perl exec because it spawns this new process and does not return.
-----
my $command = 'perl RunComputation.cgi ';
foreach my $cgi_param ($q->param) {
if ($q->param($cgi_param) && $q->param($cgi_param) ne ' ') {
if($cgi_param =~ /check\d+/) {
my @vals = $q->param($cgi_param);
foreach my $v (@vals) {
$command .= $cgi_param.'="'.$v.'" ';
}
} else {
$command .= $cgi_param.'="'.$q->param($cgi_param).'"
';
}
}
}
exec $command;
-----
The new process spawns well and the scripts behave as excepted, except
that while this child process is executing the browser stays active and
keeps loading. I want to release the browser (or provide an explicit
end of cgi command, whatever is possible) as soon as this background
process starts.
Is that possible?
Thanks,
Prachi.
filled form and pass them along as command line parameters to another
perl script that should run the computation in the background. I used
perl exec because it spawns this new process and does not return.
-----
my $command = 'perl RunComputation.cgi ';
foreach my $cgi_param ($q->param) {
if ($q->param($cgi_param) && $q->param($cgi_param) ne ' ') {
if($cgi_param =~ /check\d+/) {
my @vals = $q->param($cgi_param);
foreach my $v (@vals) {
$command .= $cgi_param.'="'.$v.'" ';
}
} else {
$command .= $cgi_param.'="'.$q->param($cgi_param).'"
';
}
}
}
exec $command;
-----
The new process spawns well and the scripts behave as excepted, except
that while this child process is executing the browser stays active and
keeps loading. I want to release the browser (or provide an explicit
end of cgi command, whatever is possible) as soon as this background
process starts.
Is that possible?
Thanks,
Prachi.