Ksycoca & QSharedMemory

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Mon Feb 25 09:10:32 GMT 2008

> Von: Benjamin Meyer
> On Feb 25, 2008, at 8:54 AM, Christian Ehrlicher wrote:
> > Hi,
> >
> > To resolve our problems with the open file handle on ksycoca and  
> > the resulting problems on windows (file can't be deleted) I would  
> > like to use QSharedMemory to share the ksycoca cache.
> > Another idea would be to use QFile::map() but this doesn't work on  
> > windows too because we can't delete the mapped file (only rename  
> > would work) :(
> Can you clarify this a bit?  Does Ksyscoca need to delete files that  
> they currently have mapped?
ksycoca currently opens the file and (maybe) mmaps it. After this it can happen that kbuildsycoca gets executed -> a new ksycoca cache is created. This fails on windows because the cache can't be deleted when an open fd for this file exists. When the file is mapped, you can't delete it too, but renaming is possible.
After the cache was rebuild, a dbus call (org.kde.KSycoca, notifyDatabaseChanged) is done which informs all clients to reopen the db.

Psst! Geheimtipp: Online Games kostenlos spielen bei den GMX Free Games! 

More information about the kde-core-devel mailing list