*laugh* I had a commment in my script that said something along the lines of, apache probably want sthe pipes closed ... And I just didn't bother testing that last night. Granted, it was 3:15 in the morning. This is perfect, thanks much. Take care, Sina -----Original Message----- From: programmingblind-bounce@xxxxxxxxxxxxx [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Martin Slack Sent: Sunday, May 10, 2009 3:25 AM To: programmingblind@xxxxxxxxxxxxx Subject: Re: Perl CGI persistence question Hi Sina, Does anything on this page help: http://coding.derkeiler.com/Archive/Perl/perl.beginners/2003-11/1148.html Regards, Martin ----- Original Message ----- From: "Sina Bahram" <sbahram@xxxxxxxxx> To: <programmingblind@xxxxxxxxxxxxx> Sent: Sunday, May 10, 2009 7:37 AM Subject: Perl CGI persistence question > Hi all, > > I've got a CGI script written in Perl, and it seems to work just fine for > the most part; however, I have the following problem. > > My script takes in some input, via a form, executes many calculations and > so > on with that data, and then emails the user when its done, with the > results. > > The problem is that these calculations, as a result of other IO issues, > take > some time to execute, on the order of minutes. No matter what I do, I > can't > fork off a process or do something else that allows me to just allow the > html page to finish loading, give the user some output like, "the results > will be emailed to you", and then to continue executing, while they > navigate > away, close their browser, or whatever. > > Here's the end of my script, after all the output and such: > > *** > > print p."Your request has been received, and an email will be sent with > your > results shortly"; > > if(fork() == 0) { > doCalc; > sendEmail; > return; > } > } > > print end_html; > > *** > > I was hoping the child would execute away, while the parent returned the > end > html ... But no, the page doesn't finish loading until the calculations > are > done. > > Is there some standard Perl or CGI way of doing this? > > Take care, > Sina > > __________ > View the list's information and change your settings at > //www.freelists.org/list/programmingblind > > __________ View the list's information and change your settings at //www.freelists.org/list/programmingblind __________ View the list's information and change your settings at //www.freelists.org/list/programmingblind