[Box Backup-commit] COMMIT r1958 - box/chris/general/lib/common
boxbackup-dev at fluffy.co.uk
boxbackup-dev at fluffy.co.uk
Sat Dec 8 22:02:44 GMT 2007
Author: chris
Date: 2007-12-08 22:02:44 +0000 (Sat, 08 Dec 2007)
New Revision: 1958
Modified:
box/chris/general/lib/common/NamedLock.cpp
Log:
Log an error if we fail to open the lockfile. (merges [1915] plus local
change).
Modified: box/chris/general/lib/common/NamedLock.cpp
===================================================================
--- box/chris/general/lib/common/NamedLock.cpp 2007-12-08 22:01:04 UTC (rev 1957)
+++ box/chris/general/lib/common/NamedLock.cpp 2007-12-08 22:02:44 UTC (rev 1958)
@@ -2,7 +2,8 @@
//
// File
// Name: NamedLock.cpp
-// Purpose: A global named lock, implemented as a lock file in file system
+// Purpose: A global named lock, implemented as a lock file in
+// file system
// Created: 2003/08/28
//
// --------------------------------------------------------------------------
@@ -58,8 +59,9 @@
//
// Function
// Name: NamedLock::TryAndGetLock(const char *, int)
-// Purpose: Trys to get a lock on the name in the file system.
-// IMPORTANT NOTE: If a file exists with this name, it will be deleted.
+// Purpose: Tries to get a lock on the name in the file system.
+// IMPORTANT NOTE: If a file exists with this name, it
+// will be deleted.
// Created: 2003/08/28
//
// --------------------------------------------------------------------------
@@ -93,6 +95,7 @@
int fd = ::open(Filename, O_WRONLY | O_CREAT | O_TRUNC, mode);
if(fd == -1)
{
+ BOX_WARNING("Failed to open lockfile: " << Filename);
THROW_EXCEPTION(CommonException, OSFileError)
}
More information about the Boxbackup-commit
mailing list