in reply to Re^2: Using exit
in thread Using exit

Take a look at merlyn's Watching long processes through CGI. It might be helpful.