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
This commit is contained in:
@@ -1504,7 +1504,7 @@ FILE* TDB::openAndLock (const std::string& file)
|
|||||||
while (flock (fileno (in), LOCK_NB | LOCK_EX) && ++retry <= 3)
|
while (flock (fileno (in), LOCK_NB | LOCK_EX) && ++retry <= 3)
|
||||||
{
|
{
|
||||||
std::cout << "Waiting for file lock..." << std::endl;
|
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);
|
delay (0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user