<snip>
I guess that if we allow multiple openings of the same project (and I
can't
see how we can prevent it) then when a setting is changed it will change
the
project file. Its probably not really a problem, it was the race when multiple instances closed that was the problem.
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 :-(, the problem isn't sm dependent, it can happen on 0.19 without any sm, in fact with a script terminating several geanys I got corruption of geany.conf. I didn't get project file corruption but that was just luck and the project file needs the same protection. 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.
- Closing a project or quitting Geany saves only the file list, and
only if that's a main instance.
Hmmm... Now did I assumed that a project is first open in a main instance?.. Or that it's open in any main instance at all? If I open foo.geany in main and bar.geany in secondary instance, bar's files will never be saved? Clearly a no-go.
Oh dear!!
Yes this will remove the race for the project file on closing multiple instances.
Socket-based main/secondary instances can't a fix race. In post-0.18 you can specify a socket name and have several "main" instances. The geany.conf patch will help with improper manual close order, not racing.
Oh Dear!!
Also I've just discovered that if I close a new_instance with files open when the main instance has a project open, on closing the project, the
main
instance's session matches the session files that were open in the new_instance.
Clearly the main instance is re-reading the conf file and getting the session files written by the new_instance. Saving session files only in
the
main instance will fix this too.
Exactly the "improper manual close order", the patch should fix it.
Given the number of "Oh dear"s aboveI guess we have to do it properly, see response to your patch
Cheers Lex
-- E-gards: Jimmy _______________________________________________ Geany-devel mailing list Geany-devel@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel