more info

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@1975 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Linas Vepstas 1999-11-22 08:27:05 +00:00
parent 73de2a8cc9
commit 56f34f47d4

View File

@ -1368,6 +1368,16 @@ writeAccountGroupToFile( const char *datafile, AccountGroup *grp )
return err; return err;
} }
/* from the close(2) manpage:
* Not checking the return value of close is a common but nevertheless
* serious programming error. File system implementations which use
* techniques as ``write-behind'' to increase performance may lead to
* write(2) succeeding, although the data has not been written yet.
* The error status may be reported at a later write operation, but it
* is guaranteed to be reported on closing the file. Not checking the
* return value when closing the file may lead to silent loss of data.
* This can especially be observed with NFS and disk quotas.
*/
err = close(fd); err = close(fd);
return err; return err;