[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: File corruption with KSaveFile on full disk
From:       Jaime Torres <jtamate () gmail ! com>
Date:       2009-09-09 20:37:20
Message-ID: 200909092237.22295.jtamate () gmail ! com
[Download RAW message or body]


On Wednesday 09 September 2009 22:00:57 David Faure wrote:
> Coming back to this old thread after losing some configuration in kmail and
> plasma after a disk full situation....

> 
> That's fine. We just want to know if something fails, whether that's
>  write() or flush().

I've been looking at the losing configuration problem (suffered several 
times), and looked at KSaveFile.
In my modest opinion, the problem is not in KSaveFile, but in KConfig write()s 
to the KSaveFile temporary file, where the returned number of bytes writed is 
never checked against the expected bytes to be writen, and therefore there is 
no way to detect the out of space condition, unless the signal SIGXFSZ is 
handled.

Looked at:
http://www.opengroup.org/onlinepubs/000095399/functions/write.html

Regards.

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic