apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject RE: [PATCH] Be verbose during shl_load on HP-UX
Date Thu, 05 Jun 2003 05:53:32 GMT
At 08:34 PM 6/4/2003, Justin Erenkrantz wrote:
>--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

You don't (RC).  The WORST POSSIBLE THING you can do is leave fd 2
pointing at some arbitrarily opened resource that suddenly is corrupted
by a library's emits, or a stray exec() in a third party module.

Although I agree with Cliff's point (that we should not be emitting stderr
messages when we can avoid it at any cost) ... any app design that 
reuses fd 0, 1 or 2 is going to trip over itself at some point.


View raw message