From 78edb61c4c6a60fd3b32d154df7d18459cd8febd Mon Sep 17 00:00:00 2001 From: Cory Donnelly Date: Mon, 26 Jul 2010 14:02:37 -0400 Subject: [PATCH] Bug #444 - Interactive undo locks pending.data and doesn't give it up - flock() now uses LOCK_EX | LOCK_NB so it won't wait for the file lock --- src/TDB.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TDB.cpp b/src/TDB.cpp index d28c7ec86..2429cdcbf 100644 --- a/src/TDB.cpp +++ b/src/TDB.cpp @@ -1504,7 +1504,7 @@ FILE* TDB::openAndLock (const std::string& file) while (flock (fileno (in), LOCK_NB | LOCK_EX) && ++retry <= 3) { std::cout << "Waiting for file lock..." << std::endl; - while (flock (fileno (in), LOCK_EX) && ++retry <= 3) + while (flock (fileno (in), LOCK_NB | LOCK_EX) && ++retry <= 3) delay (0.2); }