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

Bernd Petrovitsch bernd at firmix.at
Wed Jul 27 01:16:34 UTC 2005


On Wed, 2005-07-27 at 10:03 +1000, Glenn L. McGrath wrote:
[...]
> We should be closing and checking the return value of close. I was going
> to jump on this problem at one time for the archiving code, but i never
> got around to it.
> 
> >From man close(2)
> 
> "Not checking the return value of close is  a  common  but  nevertheless
> serious  programming error.  It is quite possible that errors on a
> previous write(2) operation are first reported at the  final  close.  
> Not checking the return value when closing the file may lead to silent
> loss of data.  This can especially be observed with NFS and with disk
> quota."

The foolowing patch wasn't accepted, though
http://www.cs.helsinki.fi/linux/linux-kernel/2002-11/0955.html

And AFAIK this hasn't changed afterwards in the Linux kernel.

The issue was also mentioned on http://lwn.net/2002/0328/kernel.php3.

	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