KConfig race condition?

Tobias Koenig tokoe at kde.org
Mon Apr 19 20:19:24 BST 2004


On Mon, Apr 19, 2004 at 07:39:48PM +0200, David Faure wrote:
> On Monday 19 April 2004 19:16, Rob Kaper wrote:
Hi,

> > One solution would be if KConfig, when saving its configuration, kept
> > entries in the file it doesn't have itself, only removing items that were
> > specifically removed by the application.
> 
> KConfig already reparses the config file before saving (if its timestamp is 
> more recent than the last save from this process), and merges the two
> (the in-process dirty entries with the on-disk config file).
> See KConfigINIBackEnd::sync().
> 
> But in your case both processes can end up saving at the same time anyway.
> I think you need real locking (somehow).
What's about adding a signal to the kconfig object which is emitted
whenever somebody changes the file on disc?

I'm not sure if this would be a performance problem, but it would allow to
let the developer react on such events.

Ciao,
Tobias
-- 
Separate politics from religion and economy!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040419/2206a57d/attachment.sig>


More information about the kde-core-devel mailing list