mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
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:
parent
3846954c42
commit
78edb61c4c
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue