File corruption with KSaveFile on full disk

Jaime Torres jtamate at gmail.com
Wed Sep 9 21:37:20 BST 2009


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090909/eb8732f7/attachment.sig>


More information about the kde-core-devel mailing list