>-----Original Message-----
>From: Justin Erenkrantz [mailto:justin@erenkrantz.com]
>--On Wednesday, June 4, 2003 9:10 PM -0400 "MATHIHALLI,MADHUSUDAN
>(HP-Cupertino,ex1)" <madhum@hp.com> wrote:
>
>> Actually, I was just wondering : why would somebody want to
>close the stderr
>> ? I'd think the best they'd do is to dup stderr to /dev/null
>or something.
>
>IIRC, httpd will specifically close stderr to ensure that the children
>processes can not write to stderr. So, yes, it's quite
>common. -- justin
>
Well.. in that case, I'd suppose it's better to dup stderr to /dev/null
(even better - the apache error_log) rather than closing stderr. If the
intention is to avoid children from writing to stderr, we ought to dup it so
that we know when a *real* error message is being printed.
By closing the stderr, I think we're just trying to put a work-around (or a
quick-fix) rather than trying to solve the problem.
|