in reply to Ensuring the user doesn't have to wait for a CGI to finish
There are a couple of strategies for this. merlyn points to one of them, which is to have the CGI fork, and continue work in the child process while the parent process exits. Works great on Unix systems, works very poorly on Win32 (IIS).
Another approach is to write a separate server process to handle work requests. The CGI queues up a request to this new worker process, either by dropping a file into a well-known directory, or by opening a socket to it and pushing the request along. The CGI pushs and HTML page back to the browser and exits, while the worker process grinds through requests.
This latter approach works well when you have control of the server. Some ISPs forbid running your own server processes.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Ensuring the user doesn't have to wait for a CGI to finish
by Aristotle (Chancellor) on Jul 11, 2002 at 21:09 UTC |