in reply to Fork child
Does the STDERR get closed automatically when I fork?
That presumably depends on the web server... Apache (mod_cgi), for example, does not close stderr (and your fork itself doesn't either), so any stuff written to stderr should by default end up in the web server's error log.
OTOH, if you have a long running script that you want to dissociate from the Apache process serving the request, you'd have to close STDERR yourself — else the connection would 'hang' (as with STDOUT). Or better yet, re-open STDERR to somewhere else.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Fork child
by gayathriAthreya (Novice) on Dec 03, 2008 at 18:20 UTC | |
by almut (Canon) on Dec 03, 2008 at 18:38 UTC |