Bug #1137
- Fixed bug #1137, which caused file locks to be non-blocking (thanks to Steve Rader).
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 <Task>::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;
|
||||
|
||||
Reference in New Issue
Block a user