Subject: Re: Warning message: Why do I care?
To: None <email@example.com>
From: Steven M. Bellovin <firstname.lastname@example.org>
Date: 08/01/2002 14:02:34
In message <20020801135402.K2158@styx.org>, email@example.com 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
> fd = open("somefile", O_WRONLY);
You could use dup2(). But I suspect there's a lot of code around that
does it your way.
--Steve Bellovin, http://www.research.att.com/~smb (me)
http://www.wilyhacker.com ("Firewalls" book)