[Geany-devel] Multiple instances of Geany issues

Lex Trotman elextr at xxxxx
Sat May 22 11:15:59 UTC 2010


On 22 May 2010 19:05, Dimitar Zhekov <hamster at mbox.contact.bg> wrote:

> On Sat, 22 May 2010 12:55:40 +1000
> Lex Trotman <elextr at gmail.com> wrote:
>
> > [...]
> > > Isn't the "race" (as in broken file because 2+ instances write it at
> > > once) only a problem of the original SM implementation? I mean, a user
> > > can't close two projects or two Geany-s _that_ fast?..
> > >
> >
> > No, but logout or shutdown can :-(
>
> Perhaps under Windows only? When I logout, Geany is simply killed, and
> the configuration file remains unchanged. If fact, if the normal
> application quit sequences were executed on logout (as under Windows),
> X11 woudn't need much of a session manager.
>

Thats kind of nasty, glad I always save my files.


>
> > That was on a local filesystem, if your home dir is NFSed from a server
> > it would be slower and the time window for problems would be even
> greater.
>
> Indeed... Speaking of NFS (I read the patch) O_EXCL is problematic. On
> Linux, NFSv3+ and kernel 2.6+ are enough, so it should work, but I
> don't know about the other OS-es.
>
> 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.



> http://www.kernel.org/doc/man-pages/online/pages/man2/open.2.html
> specifies how to do atomic O_EXCL on NFS, but uses link(), which is not
> available under Windows...
>

Yeah, so I just  used the plain file create lock.

>
> >> [...]
> > Oh dear!!
>
> One more "Oh, dear" situation: when Geany is _started_ with a project
> file, it writes the project-less file list into geany.conf. With the
> patch applied, at least the secondary instances don't do this...
>
> Yes, saw your patch for that.


> > Given the number of "Oh dear"s aboveI guess we have to do it properly,
> see
> > response to your patch
>
> If the lock file is not successfully unlinked by Geany for some
> reason, for example a broken NFS connection, it'll have to be deleted
> manually. Well, that shoudn't be a big problem, but if there's some way
> to avoid it...
>
>
Not that I'm aware of, anybody who knows any other way that works on *ix and
Windows is welcome to suggest it.

Cheers
Lex


>  --
> E-gards: Jimmy
> _______________________________________________
> Geany-devel mailing list
> Geany-devel at uvena.de
> http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geany.org/pipermail/devel/attachments/20100522/76bef192/attachment.html>


More information about the Devel mailing list