in reply to Keep running script but ending it to the browser
It's probably dependant upon the server to some extent, but closing STDOUT and STDERR works for me. But I don't use Apache..