[Geany-devel] Multiple instances of Geany issues

Dimitar Zhekov hamster at xxxxx
Sat May 22 09:05:02 UTC 2010


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.

> 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.

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...

>> [...]
> 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...

> 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...

-- 
E-gards: Jimmy



More information about the Devel mailing list