Kleopatra switched to the QGpgME API for engine gpgconf. Now ~50% of
configuration changes made on Windows are ignored. I can see the process call to
gpgconf in the gpgme log and the writes of the configuration change into the
pipe to gpgconf but but they never make it into the config file.
I've tried to reproduce this without Kleopatra on Linux and wrote a small
testcase that writes a configuration value (Changes keyserver to
hkp://email@example.com) and reads it afterwards. This sometimes fails, sometimes not.
In difference to the windows behavior the actual config file is always written
with the correct value even if the test failed.
I thought that maybe gpgconf_write returned too early before the gpgconf process
was actually finished and inserted a waitpid on the spawned process after
gpgconf_write finished writing but this did not help.
In attached logs gpgme_bad / gpgme_good you can see around line 793 that
change-options is called and the option is written.
Then on line 934 you can see that the config value is still unchanged in the bad
case but the keyserver is foo.bar.baz in the good case.
The good log is a bit longer because the test aborted earlier inn the bad case.