summaryrefslogtreecommitdiff
path: root/lib/common/NamedLock.cpp
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2007-11-04 14:45:05 +0000
committerChris Wilson <chris+github@qwirx.com>2007-11-04 14:45:05 +0000
commitd65334388a3a0682ca2b864f2d7f50b48cde5626 (patch)
tree6d5ee37b52e3c502ccf189e81c2e55628ec7510d /lib/common/NamedLock.cpp
parentac3cf1cee924017c42a36e349dc40556e4be6125 (diff)
Log an error if we fail to open the lockfile.
Diffstat (limited to 'lib/common/NamedLock.cpp')
-rw-r--r--lib/common/NamedLock.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/common/NamedLock.cpp b/lib/common/NamedLock.cpp
index 2418c60c..16c580ba 100644
--- a/lib/common/NamedLock.cpp
+++ b/lib/common/NamedLock.cpp
@@ -59,7 +59,7 @@ NamedLock::~NamedLock()
// 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.
+// IMPORTANT NOTE: If a file exists with this name, it will be deleted.
// Created: 2003/08/28
//
// --------------------------------------------------------------------------
@@ -93,6 +93,7 @@ bool NamedLock::TryAndGetLock(const char *Filename, int mode)
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)
}