in reply to Stream or Broadcast Output from CGI script

For “a process that runs for 20 minutes,” you might wish to use a batch-processing monitor of some kind in order to manage that workload – in particular, to make sure that multiple copies of it aren't running at once.

The “I‘m working on it” example from Randall Schwartz, hotlinked above, might be most appropriate in this situation. The user might wish to spend the twenty minutes poking around on perlmonks.org in the meantime, for instance...