[Pdx-pm] CGI & flushing filehandles
Randal L. Schwartz
merlyn at stonehenge.com
Wed Mar 24 23:59:48 CST 2004
>>>>> "Wil" == Wil Cooley <wcooley at nakedape.cc> writes:
Wil> On Wed, 2004-03-24 at 21:25, Randal L. Schwartz wrote:
>> Watching Long Processes through CGI is at
>> <http://www.stonehenge.com/merlyn/LinuxMag/col39.html>.
Wil> Thanks; I'd thought about the server-push/meta-refresh approach, but I
Wil> expressly don't need to send the agent any further output, so all the
Wil> framework necessary for implementing this is unnecessary.
I misunderstood. I thought that you wanted the browser to know
when the possibly delayed task was done.
If not, then a simple fork will do it:
... normal cgi stuff here to return a normal page ...
... at end of script:
exit 0 if fork;
close STDOUT; # essential to let child continue without tying up browser
... start of things to do after browser is released ...
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
More information about the Pdx-pm-list
mailing list