[Geany-devel] Multiple instances of Geany issues

Dimitar Zhekov hamster at xxxxx
Sun May 23 15:04:55 UTC 2010


On Sun, 23 May 2010 08:04:33 +1000
Lex Trotman <elextr at gmail.com> wrote:

> You can get this behaviour by setting the hidden preference
> use_safe_file_saving,  in that case utils_write_file uses
> g_file_set_contents which does _exactly_ what you describe, problem
> is it changes owners and permissions and doesn't work on some file
> systems, see thread "[Geany-devel] Safe file saving - permissions
> issue" and older ones on the same topic.

Not exactly. geany.conf is a special case: it's more important to make
sure that it is consistent than that it is saved. As of the
permissions, do we support such thing as "shared configuration
directory"? If not, they won't be an issue either.

> Enrico still gets headaches when he thinks about that thread :-)
> because the "fix" seems to require GIO which isn't available with the
> oldest glib supported by Geany so it would require two file handling
> codes to maintain.

Both the g_open() used by you, and g_rename(), exist since 2.6; the
documentation says they are wrappers for the respective POSIX
functions. Personally I'd expect that the support for open(O_EXCL) is
worse that rename(), the latter being also an ANSI function.

> [...]
> But OTOH I now think it unlikely that 0.19 will get problems (unless
> you do extreme things like my script :-), so we are only talking about
> sm versions needing the lock

I think so too, and my X sm is raceless, so...

Can anyone please test if Windows waits for the WM_QUIT message to be
processed before sending a WM_QUIT to another program on logout?
Just open 2 Geany-s, modify a file in both of them and logout. If the
"Do you want to save?" messages are displayed one by one, we'd better
drop the locking/renaming at all, it has too many potential problems.

-- 
E-gards: Jimmy



More information about the Devel mailing list