in reply to How to tell if a browser is still listening to a CGI

As an alternative, how about forking a background process to handle the user's request, sending it's results to the user by email. The main CGI program can then serve up a webpage immediately (with a 'Please wait' message) so the user knows that their request is being dealt with.

For information on how to fork from a CGI script, see these nodes: Running a process in the background from CGI scripts..., How do you tell the parent process to stop it's HTTP transfer, when it forks off a child process?, and forking from web.

This method will also mean that you do not need to worry about identifying if multiple requests are from the same user (how are you planning to do this, btw?).

Cheers,

JJ

  • Comment on Re: How to tell if a browser is still listening to a CGI