How do I run time-killing program to background in perl CGI script?



Hi,

I have a question that trouble me for long time.

I wrote a perl CGI script that call c++ program, alignment.exe. But
running of alignment.exe will take several hours. So, in

the perl script, I plan to let alignment.exe in background and return
the message to client end. The message said that

alignment.exe is running and results will be mailed to user.


I use two methods below in my script, but no one is succesful

Method 1:
#! /usr/bin/perl
system("start alignment.exe");
print "Content-type: text/html\n\n";
print "Proramming is running and results will be returned by e-mail";




Method 2:
#! /usr/bin/perl
use threads;

my $t1=threads->create("alignment");

print "Content-type: text/html\n\n";
print "Proramming is running and results will be returned by e-mail";


sub alignment {
system("alignment.exe");
}



For method 1, script is stucked in system("start alignment.exe");
For method 2, script does not execute alignment.exe.


Thanks in advance for any help. I use windows XP professional and
internet information service at server side.

You can reply or mail to llnncsu@xxxxxxxxxx

Thanks,
Mei

.



Relevant Pages

  • RE: Automated script to connect to a web site and change the Password
    ... Mallik posted this reply: ... :: Subject: Automated script to connect to a web site and change ... I need to write a Perl CGI script that connects to ... Please suggest any idea/code available. ...
    (perl.beginners)
  • Re: Adding to a perl script automatically
    ... I have a perl cgi script which defines popup_menu and values in the ... As far as this operation is concerned, your Perl CGI script is just a plain text file where you want to add some text. ... First of all, you may want to modify your Perl CGI script such that adding the relevant entries is easy, e.g. put the entries into an array and add a marker: ... Use this array when constructing your CGI menu. ...
    (comp.lang.perl.misc)
  • Re: Perl CGI script to emulate a shell command line window
    ... > You have FTP access to a Linux box with a Perl CGI script engine ... The solution we suggest you is to create two scripts, a CGI wich ...
    (comp.lang.perl.misc)
  • Bizar variable problem
    ... I have a simple html form that sends 3 values to perl cgi script. ... if I print the variables to the browser it ... have tried (IE, Netscape 7.1, Opera) it gives me this problem, which is ...
    (comp.lang.perl)
  • Re: Perl CGI script to emulate a shell command line window
    ... > You have FTP access to a Linux box with a Perl CGI script engine ... The solution we suggest you is to create two scripts, a CGI ...
    (comp.lang.perl.misc)