[BusyBox] Re: ifconfig: Clean up. [PATCH]

Bernd Petrovitsch bernd at firmix.at
Thu Jul 28 17:04:44 UTC 2005


On Thu, 2005-07-28 at 11:49 -0500, Rob Landley wrote:
> On Wednesday 27 July 2005 07:10, Bernd Petrovitsch wrote:
[...]
> > Actually the function prototype should be changed to "void
> > close(void);".
> 
> That could break existing source code.

ACK. I just wanted to make clear what I mean.

> > Apart from avoiding the confusion (which will surely come) in the above
> > mentioned thread, why the fd is destroyed even if close(2) failed
> > before.
> 
> The alternative would be that programs that _didn't_ check the return code 
> (which vastly outnumber those that do) would potentially leak filehandles.

I'm in now way advocating or even proposing that close(2) shouldn't
close the fd (even if it reports an error).
But IMHO a lot of people will think that way.

	Bernd
-- 
Firmix Software GmbH                   http://www.firmix.at/
mobil: +43 664 4416156                 fax: +43 1 7890849-55
          Embedded Linux Development and Services




More information about the busybox mailing list