How do I run time-killing program to background in perl CGI script?
- From: "Mei" <meihao88@xxxxxxxxx>
- Date: 27 May 2005 08:40:11 -0700
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
.
- Prev by Date: Re: remove duplicate lines
- Next by Date: char display on z/OS
- Previous by thread: Setting up the DBD::ODBC module
- Next by thread: char display on z/OS
- Index(es):
Relevant Pages
|