On Mon, 24 May 2010 14:38:53 +1000 Lex Trotman elextr@gmail.com wrote:
Comments from "Multiple instances of Geany issues" thread...
I think so too, and my X sm is raceless, so..
AFAICT only partly raceless, please point me to where I've misunderstood, I'm not that great at reading diffs.
My understanding is:
[...]
For projects I can't see where it saves different versions for each instance on a session manager save so there can be a race here.
It doesn't save the projects at all. A project consists of: - Settings - these are saved by the Project -> Properties function. - List of open files - saved into geany-smclientid.conf.
Since my goal is to continue a restarted session as if it was never interrupted (well, with the exception of the editor files), not saving the project is the right thing to do.
[...]
And I just thought of another one, filetypes files, see filetypes_save_commands() called from main_quit() so there can be a race here too I think.
Yes, if 2+ sessions have modified the commands for the same file type... Which brings questions belonging to the save settings thread, so I'll answer there.
If locking still needed, what problems do you see?? On filesystems and platforms where it works it will remove races, on platforms where it doesn't work things won't be any worse than they are without it.
Perhaps I'm too wary. The only case I can think about is a network directory configured so that the files are writable, but not deletable (a reasonable precaution for a shared directory). In such a case, O_EXCL will leave stalled files, and rename will fail too.
Under *ix, the configuration directory should have deletable files anyway, otherwise the socket/symlink will not work properly.
-- E-gards: Jimmy