From 2be52e1be2a8e579b1e4ef6c52260775de4e1b44 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 10 Feb 2013 23:25:27 -0500 Subject: [PATCH] Bug #1137 - Fixed bug #1137, which caused file locks to be non-blocking (thanks to Steve Rader). --- ChangeLog | 2 ++ src/Context.cpp | 1 + src/TDB2.cpp | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5cdbb9088..dae7b75d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -74,6 +74,8 @@ Bugs left-justified (thanks to Steve Rader). + Fixed bug #1136, #1177, which incorrectly line-wrapped tasks with annotations (thanks to Steve Rader, T. Charles Yun). + + Fixed bug #1137, which caused file locks to be non-blocking (thanks to Steve + Rader). + Fixed bug #1150, which referenced deprecated features in the tutorial man page (thanks to Benjamin Weber). + Fixed bug #1154, which now allows priorities to be specified in any case. diff --git a/src/Context.cpp b/src/Context.cpp index 944822ba7..a74add980 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -538,6 +538,7 @@ void Context::shadow () " rc.detection:off" + // No need to determine terminal size " rc.color:off" + // Color off by default " rc.gc:off " + // GC off, to reduce headaches + " rc.locking:off" + // No file locking " rc:" + rcfile + " " + // Use specified rc file command + // User specified command " >" + // Capture diff --git a/src/TDB2.cpp b/src/TDB2.cpp index c16402bd5..ba45321cf 100644 --- a/src/TDB2.cpp +++ b/src/TDB2.cpp @@ -210,7 +210,7 @@ void TF2::commit () if (_file.open ()) { if (context.config.getBoolean ("locking")) - _file.lock (); + _file.waitForLock (); // Write out all the added tasks. std::vector ::iterator task; @@ -333,7 +333,7 @@ void TF2::load_lines () if (_file.open ()) { if (context.config.getBoolean ("locking")) - _file.lock (); + _file.waitForLock (); _file.read (_lines); _loaded_lines = true;