How do clients(web browser) close a python CGI program that is not responding?
kylotan at gmail.com
Tue Mar 28 10:49:21 CEST 2006
Sullivan WxPyQtKinter wrote:
> Hi,there. Sometimes a python CGI script tries to output great
> quantities of HTML responce or in other cases, it just falls into a
> dead loop. How could my client close that CGI script running on the
Generally speaking, remote users don't have control over your local
processes, and if there is some problem with that local process that
causes it to loop indefinitely, the chance that it could react
appropriately to the browser is slim anyway. So the answer is to fix
the problem with the CGI program.
> In addition, how could I configure that if a CGI program do not finish
> its task in 20sec or so, it will be automatically terminated?
I suppose you could run it in a background thread or process,
terminating it after the allotted time has expired, but I suspect you'd
be better off addressing whatever is causing the problem in the first
place. What sort of CGI program is this?
More information about the Python-list