summaryrefslogtreecommitdiff
path: root/t/t9152-svn-empty-dirs-after-gc.sh
diff options
context:
space:
mode:
authorLibravatar Max Kirillov <max@max630.net>2015-03-04 05:58:18 +0200
committerLibravatar Paul Mackerras <paulus@samba.org>2015-03-15 14:14:22 +1100
commiteaf7e835e61de98488592e02b31da9f44fd4505d (patch)
treead5ac2e5ed7164a5f83eb5a214eb72a46fe25ada /t/t9152-svn-empty-dirs-after-gc.sh
parentgitk: Report errors in saving config file (diff)
downloadtgif-eaf7e835e61de98488592e02b31da9f44fd4505d.tar.xz
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>
Diffstat (limited to 't/t9152-svn-empty-dirs-after-gc.sh')
0 files changed, 0 insertions, 0 deletions