Subject: Re: Warning message: Why do I care?
To: Steven M. Bellovin <smb@research.att.com>
From: None <ww@styx.org>
List: current-users
Date: 08/01/2002 14:07:40
On Thu, Aug 01, 2002 at 02:02:34PM -0400, Steven M. Bellovin wrote:
> In message <20020801135402.K2158@styx.org>, ww@styx.org writes:
> >On Thu, Aug 01, 2002 at 12:34:07PM -0400, John Franklin wrote:
> >> 
> >> I disagree.  Too much software treats fd 0-2 as sacred.  I don't think
> >> that open(2) should ever return a fd below 3.  I don't belive this would
> >> break anything.
> >
> >how would you redirect output to a file then? usually this
> >is implemented with something like
> >
> >  close(1);
> >  fd = open("somefile", O_WRONLY);
> >
> You could use dup2().  But I suspect there's a lot of code around that 
> does it your way.

sure. s/usually/often/. point is, it would definitely break things.

-w