On Thu, 19 Dec 2002 09:45:19 -0000, "Austin Donnelly" <[EMAIL PROTECTED]> wrote:
[quoting Rockwalrus, who quoted Sven:]
> >   Saving .xcf on full filesystem hangs GIMP
> >   http://bugzilla.gnome.org/show_bug.cgi?id=101340
> Note that just checking write() or fwrite() return values may not be
> enough: some filesystems delay the error indictation until close() is
> called on the fd.  So this bug may well be influenced by the filesystem
> GIMP is writing to at the time.

Yes, this is very important!  Checking only the return value of fwrite()
and ignoring the return value of close() is a recipe for disaster.  You
should also bear in mind that some filesystems (even the good old ext2)
may behave differently if quotas are enabled.

I do most of my GIMP work over NFS, and many NFS filesystem checks are
delayed until the call to close().  I also enable quotas for myself and
all other users on most of the machines that I manage.   So testing the
return value of fwrite() and ignoring the close() would only shift the
problem described in bug #101340: instead of locking the GIMP, the user
would lose the image without getting any error message.  I don't know
which problem is worse...

Gimp-developer mailing list

Reply via email to