Hi All,
In a perl-cgi script, i am trying to execute a system command which runs a perl script in the background.
I'd like to give a message saying the script is running.
The simple cgi script i wrote has the following lines:
===============================================
#!/usr/bin/perl
use CGI qwall);
$cmd = "test.pl &";
system($cmd);
print header;
print qq( <HTML>
<TITLE>running Priority Listing</TITLE>
<h3> The report is running ...........</h3>);
print end_html;
===========================================================
This script runs fine. How ever, the message is not displayed until the system command is completed. Even though i've an "&" at the end of the command, it doesnot run the process in the background.
My question is how do i make the script to run the process in the background and give me the message that the report is running, with out waiting for the system command to finish?
Thanks.
Madhu
In a perl-cgi script, i am trying to execute a system command which runs a perl script in the background.
I'd like to give a message saying the script is running.
The simple cgi script i wrote has the following lines:
===============================================
#!/usr/bin/perl
use CGI qwall);
$cmd = "test.pl &";
system($cmd);
print header;
print qq( <HTML>
<TITLE>running Priority Listing</TITLE>
<h3> The report is running ...........</h3>);
print end_html;
===========================================================
This script runs fine. How ever, the message is not displayed until the system command is completed. Even though i've an "&" at the end of the command, it doesnot run the process in the background.
My question is how do i make the script to run the process in the background and give me the message that the report is running, with out waiting for the system command to finish?
Thanks.
Madhu