in reply to Long running CGI script

See Watching long processes through CGI - merlyn tells it much better than I can.