Find a file
Max Kirillov eaf7e835e6 gitk: Synchronize config file writes
If several gitk instances are closed simultaneously, the savestuff
procedure can run at the same time, resulting in a conflict which may
cause losing of some of the instance's changes, failing the saving
operation or even corrupting the configuration file. This can happen,
for example, at user session closing, or at group closing of all
instances of an application which is possible in some desktop
environments.

To avoid this, make sure that only one saving operation is in
progress.  It is guarded by existence of the $config_file_tmp
file. Creating the file and moving it to $config_file are both atomic
operations, so it should be reliable.

Reading does not need to be syncronized, because moving is an atomic
operation, and the $config_file always refers to a full and correct file.
But, if there is a stale $config_file_tmp file, report it at gitk start.
If such file is detected when saving, just report it abort the save, as
for other errors in saving.

Signed-off-by: Max Kirillov <max@max630.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2015-03-15 14:14:22 +11:00
po gitk: Updated Bulgarian translation (302t,0f,0u) 2014-08-08 16:39:30 +10:00
.gitignore gitk: Ignore gitk-wish buildproduct 2013-01-30 21:12:16 +11:00
gitk gitk: Synchronize config file writes 2015-03-15 14:14:22 +11:00
Makefile gitk: Ignore gitk-wish buildproduct 2013-01-30 21:12:16 +11:00