Review last 3 changes to duchain

Andreas Pakulat apaku at gmx.de
Fri Jan 30 07:24:55 UTC 2009


On 30.01.09 00:41:34, David nolden wrote:
> Am Freitag 30 Januar 2009 00:17:45 schrieb Andreas Pakulat:
> > Hi,
> >
> > I just checked in 3 changes for duchain to make kdev4 start up on win32 and
> > like to have the expert(s) review them. In particular the moving of the
> > KLockFile::unlock from after removeDirectory to before that in
> > itemrepository.cpp.
> >
> > I think the last change is probably a no-brainer...
> >
> > Andreas
> 
> About the IndexedString change:
> Why is it necessary to create that function?

Because else the variable in that file is not initialized.

> RepositoryManager only exists 
> exactly for the same reason: To make the initialization-order stuff work 
> better.
> Cannout you somehow fix that issue within RepositoryManager?

No, this is MSVC deciding not to initialize the variable in indexedstring.h
and hence the constructor for RepositoryManager is not called. Not even if
I add a static before that variable.

> About the added file unlock in itemrepository.cpp:
> This leaves a very small danger window.

I hoped that would not be the case :( One possibility would be moving the
lockfile out of the actual directory to be deleted and delete it
separately...

> I've made it write-lock the directory(this doesn't keep an open file)
> during that window, it should be ok like that.

If you want to remove the directory you've got the same problem actually.
I'll test that later today.

Of course this mostly happens if either the repo gets screwed up, or the
first start of kdevelop crashes early on and the second then detects more
than the lock-file in the directory.

Andreas

-- 
You will be recognized and honored as a community leader.




More information about the KDevelop-devel mailing list