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.
In reply to Re: Fork child
by almut
in thread Fork child
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |