<br><br><div class="gmail_quote">On 22 May 2010 19:05, Dimitar Zhekov <span dir="ltr"><<a href="mailto:hamster@mbox.contact.bg" target="_blank">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;">


On Sat, 22 May 2010 12:55:40 +1000<br>
<div>Lex Trotman <<a href="mailto:elextr@gmail.com" target="_blank">elextr@gmail.com</a>> wrote:<br>
<br>
</div>> [...]<br>
<div>> > Isn't the "race" (as in broken file because 2+ instances write it at<br>
> > once) only a problem of the original SM implementation? I mean, a user<br>
> > can't close two projects or two Geany-s _that_ fast?..<br>
> ><br>
><br>
> No, but logout or shutdown can :-(<br>
<br>
</div>Perhaps under Windows only? When I logout, Geany is simply killed, and<br>
the configuration file remains unchanged. If fact, if the normal<br>
application quit sequences were executed on logout (as under Windows),<br>
X11 woudn't need much of a session manager.<br></blockquote><div><br>Thats kind of nasty, glad I always save my files.<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;">



<div><br>
> That was on a local filesystem, if your home dir is NFSed from a server<br>
> it would be slower and the time window for problems would be even greater.<br>
<br>
</div>Indeed... Speaking of NFS (I read the patch) O_EXCL is problematic. On<br>
Linux, NFSv3+ and kernel 2.6+ are enough, so it should work, but I<br>
don't know about the other OS-es.<br>
<br></blockquote><div>Thats correct, note I used g_open which seems to say that it works under windows as well.  Windows actually has better locking than Unix in some ways, so if g_open uses it right it should be ok, the only potential problem is that it can be disabled by registery settings, according to Samba documentation anyway.<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;">
<a href="http://www.kernel.org/doc/man-pages/online/pages/man2/open.2.html" target="_blank">http://www.kernel.org/doc/man-pages/online/pages/man2/open.2.html</a><br>
specifies how to do atomic O_EXCL on NFS, but uses link(), which is not<br>
available under Windows...<br></blockquote><div><br>Yeah, so I just  used the plain file create lock.<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">



<br>
>> [...]<br>
> Oh dear!!<br>
<br>
One more "Oh, dear" situation: when Geany is _started_ with a project<br>
file, it writes the project-less file list into geany.conf. With the<br>
patch applied, at least the secondary instances don't do this...<br>
<div><br></div></blockquote><div>Yes, saw your patch for that.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>

> Given the number of "Oh dear"s aboveI guess we have to do it properly, see<br>
> response to your patch<br>
<br>
</div>If the lock file is not successfully unlinked by Geany for some<br>
reason, for example a broken NFS connection, it'll have to be deleted<br>
manually. Well, that shoudn't be a big problem, but if there's some way<br>
to avoid it...<br>
<font color="#888888"><br></font></blockquote><div><br>Not that I'm aware of, anybody who knows any other way that works on *ix and Windows is welcome to suggest it.<br><br>Cheers<br>Lex<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>
</font><div><div></div><div>E-gards: Jimmy<br>
_______________________________________________<br>
Geany-devel mailing list<br>
<a href="mailto:Geany-devel@uvena.de" target="_blank">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>