On 4/4/07, Brian Volk <[EMAIL PROTECTED]> wrote:
I would like to thank you page to be displayed instantly while the download continues to run in the background; kind of like the '&' does at the end of a bash command. Is this possible?
Sure; but there are some aspects to be aware of. Generally, the webserver will consider your process to be complete once the three standard filehandles are closed, even if the process (or a child process) is still running in the background. Some servers may also wait for the process itself to finish, so the usual technique is to fork a child process that closes the handles; meanwhile, the parent process quits as usual (which closes its handles). The server, with neither an active (main) process nor an open filehandle, serves up the finished web page and forgets about the child process that's still running. Of course, there's nothing specific about Perl in any of this; it's the same whether you're using Perl or not. That's a sign that this is more the type of question that CGI programming forums are made for. If you have more questions about CGI programming, I encourage you to seek one of those forums. Hope this helps! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/