KConfig race condition?

Jason Keirstead jason at keirstead.org
Mon Apr 19 22:47:51 BST 2004


On April 19, 2004 05:24 pm, Waldo Bastian wrote:
>  I'm having a problem where two applications want to update KConfig at the
> > same time. Both application instances receive a notification to store a key
> > (a cookie*), but it has happened where the save of the second application
> > undid the change by the first.
> 
> You need to do proper file-locking then. I can add a lock function to KConfig
> for that if you like. (KDE 3.3)

Is there any readon why KConfig::sync() shouldn't *always* lock the config in some fashion
while the key merging and whatnot is taking place before write, so that other KConfigs trying
to write have to wait?

For some reason I always figured KConfig already had transactional-style locking built into it.

-- 
There's no place like 127.0.0.1

http://www.keirstead.org




More information about the kde-core-devel mailing list