KConfig race condition?

Waldo Bastian bastian at kde.org
Mon Apr 19 21:24:19 BST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon April 19 2004 19:16, Rob Kaper 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)

> Should I reload the configuration always before saving it

Only if you have a read-modify-write cycle.

Cheers,
Waldo
- -- 
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
^ bastian at kde.org | Is your software SUSE LINUX READY? | bastian at suse.com
^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQFAhDVzN4pvrENfboIRAhhqAJ9S+vJmkZfRA7wtoW1CLFPfsMdzoACgpYeU
UD5SOPQLWWJPtp75EmiGZvM=
=qR4S
-----END PGP SIGNATURE-----




More information about the kde-core-devel mailing list