Usually just closing STDOUT worked.
That's contrary to my experience with a default Apache / mod_cgi setup. I've always had to close both STDOUT and STDERR to cleanly dissociate a long running process. But as it looks (you don't seem to find the error messages anywhere), there is some configuration variant, with which stderr is being closed for CGIs (or rather, no pipe for stderr is being set up in the first place...). In that case, you of course wouldn't have to close it another time.
I have been thinking about ways to capture error messages
Why not just reopen STDERR to some file? Or maybe use CGI::Carp "fatalsToBrowser"; — or, more generally, carpout ("fatalsToBrowser" of course wouldn't make sense for any long running process, as the connection to the browser would no longer be established in that case).
Anyhow, more details about your configuration might help...
In reply to Re^3: Fork child
by almut
in thread Fork child
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |