Hi,<br><br>I like time zone differences, I go to bed with a problem and wake up to a nice patch (or two) to read over breakfast :-) so here's one for you.<br><br>The only real solution to potential corruption is to make the writes to shared config files atomic.  The patch uses the good old fashioned exclusive lock file method. IIUC this should also work on windows, but may need registry settings to be correct, I'm not sure.  Nothing else I researched seemed to be portable.<br>
<br>In race conditions this patch doesn't say which write will win, but it is intended to guarantee that whichever does will be written atomically and not corrupted.  <br><br>In general there is no way Geany can know which write should win, the user has to do that themselves by closing instances manually in the right order so the last wins.<br>
<br>The patch has both yours and mine in the one.<br><br>Your patches stop new_instances upsetting geany.conf and mine handles shared project files and geany.conf in the case of multiple main instances.<br><br>Lets see if anyone else can get it to fail.<br>
<br>Cheers<br>Lex<br><br><div class="gmail_quote">On 21 May 2010 23:52, Dimitar Zhekov <span dir="ltr"><<a href="mailto:hamster@mbox.contact.bg">hamster@mbox.contact.bg</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
There is one more case when geany.conf may be modified by a secondary<br>
instance: saving the project-less file list on Project -> New / Open.<br>
Patch attached.<br>
<font color="#888888"><br>
--<br>
E-gards: Jimmy<br>
</font><br>_______________________________________________<br>
Geany-devel mailing list<br>
<a href="mailto:Geany-devel@uvena.de">Geany-devel@uvena.de</a><br>
<a href="http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel" target="_blank">http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel</a><br>
<br></blockquote></div><br>