[Pdx-pm] CGI & flushing filehandles
Randal L. Schwartz
merlyn at stonehenge.com
Wed Mar 24 23:26:00 CST 2004
>>>>> "Wil" == Wil Cooley <wcooley at nakedape.cc> writes:
Wil> I'm working on a CGI application that needs to sleep() a minute or two
Wil> before performing some final operations (it needs to send an e-mail to
Wil> an account that's being created, but the external process that creates
Wil> the account checks for new tasks every minute). The problem is the the
Wil> page doesn't seem to finish loading regardless of whether I have $|=1
Wil> set or whether I close(STDOUT). What does work is to fork(), sleep(),
Wil> then send the e-mail, but this seems rather kludgy to me. Is this the
Wil> best way to handle this sort of thing?
Watching Long Processes through CGI is at
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