[Geany-devel] Race condition when saving geany.conf

Eugene Arshinov earshinov at xxxxx
Wed Mar 3 09:03:04 UTC 2010


On Tue, 2 Mar 2010 22:49:17 +0300%
Dimitar Zhekov <hamster at mbox.contact.bg> wrote:

> On Tue, 2 Mar 2010 22:40:48 +0300
> Eugene Arshinov <earshinov at gmail.com> wrote:
> 
> > On Tue, 2 Mar 2010 20:25:50 +0300%
> > Dimitar Zhekov <hamster at mbox.contact.bg> wrote:
> > 
> > > On Tue, 2 Mar 2010 16:02:48 +0300
> > > Eugene Arshinov <earshinov at gmail.com> wrote:
> > > 
> > > In short, save <smclientid>.conf files instead of "geany.conf".
> > > That will not save any global options, so if you restart the
> > > session and then launch a new geany, it will not use such saved
> > > options. However, if you launch a geany instance _without_
> > > restarting the session, exactly the same thing will happen.
> > >
> > 
> > And who saves the global options then? We need them written, for
> > being read by new instances of geany.
> 
> Nobody. Please forget the sessions for a moment - if you launch a new
> geany, right now, will any currently unsaved options from your
> running geany(s) be magically saved by some primary instance?
> No, you'll get what's in geany.conf right now. And you'll get
> absolutely the same after you restart.
> 
> Want to save some unsaved options, so a newly launched geany will use
> them? Just go to the instance you want the options from and do it.
> Before or after restart, that doesn't matter.
> 
> Saving some "global options" contradicts "restore everything exactly".
> While you work, the unsaved options (if any) are not autosaved
> on each X minutes or something - so why they should be autosaved only
> because there will be some "downtime" before you continue to work?
> 

Okay, now I understand your suggestion. In my opinion, your version is
more flexible (a user controls when and which settings are saved, not
Geany), but most users will never need that flexibility. Again, your
version may be more clear for users (instances have same settings after
restart), but I still like the accepted behaviour more, for the reasons
I described in the prev. message.

A side note. I think the two suggestions are rather orthogonal. For
example, it is possible to use temporary files for storing settings
across restarts and use the main-instance-auto-saves behaviour at the
same time. Another example (drop main-instance-auto-save, but still use
global geany.conf after restart) isn't so good as it may cause a loss
of settings changes.

Other opinions?

Best regards,
Eugene.



More information about the Devel mailing list