<br><br><div class="gmail_quote">On 27 February 2010 03:36, Randy Kramer <span dir="ltr"><<a href="mailto:rhkramer@gmail.com">rhkramer@gmail.com</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;">
I haven't paid careful attention to this thread, but on several projects<br>
I've worked on, we've adopted a "last to save, wins" philosophy for<br>
situations (somewhat) similar to this.<br>
<br>
I've learned to deal with that in several applications including nedit,<br>
and it seems to be a reasonable approach, requiring, iiuc, no work.<br></blockquote><div><br>Hi Randy,<br><br>As I understand it, what Eugene is worried about is that when several instances finish at the same time without synchronisation it might not be last wins so much as random config file wins.  Several instances will all try to finish at once if you shut down/logout with several Geanys out of their bottle :-)<br>
<br>Cheers<br>Lex<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<font color="#888888"><br>
Randy Kramer<br>
</font><div class="im"><br>
On Friday 26 February 2010 10:15:02 am Nick Treleaven wrote:<br>
> On Wed, 24 Feb 2010 12:04:20 +0300<br>
> Eugene Arshinov <<a href="mailto:earshinov@gmail.com">earshinov@gmail.com</a>> wrote:<br>
</div><div class="im">> > When several instances of Geany quit in the same time, there is a<br>
> > high possibility of a conflict. I can reproduce it easily on my<br>
> > machine, using either trunk or SM version.<br>
> ><br>
> > To reproduce: open three instances of geany, "geany", "geany -i"<br>
> > and another "geany" (absence of file names implies -i automatically<br>
> > in this case). It would be better to open three different files in<br>
> > the instances, to distinguish them. Then logout or reboot without<br>
> > quitting geany manually. On my machine, after I (in case of trunk)<br>
> > or SM code (in case of SM) restart geany, the default session is<br>
> > always cleared. Expected behaviour: the default session is managed<br>
> > by the first of the three instances and contains the files, which<br>
> > were opened in that instance, after restart.<br>
> ><br>
> > I can see two solutions for this problem. The first is an<br>
> > additional POSIX process-shared semaphore / mutex for Windows to<br>
> > guard geany.conf. This should eliminate the problem completely.<br>
> > AFAIK, there are no wrappers for process synchronization primitives<br>
> > in GLib, so I'll need to write a thin wrapper myself.<br>
> ><br>
> > The second option is to change the behaviour of "new instances". If<br>
> > such an instance (#1) detects a "main instance" (#2) running, it<br>
> > should not touch geany.conf. Actually, to deal with the described<br>
> > issue, it is enough to implement this behaviour only when #1 tries<br>
> > to save geany.conf while quitting.<br>
</div><div><div></div><div class="h5">_______________________________________________<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>
</div></div></blockquote></div><br>