summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/storage_engine_lock_file_posix.cpp
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2015-01-07 11:47:50 -0500
committerBenety Goh <benety@mongodb.com>2015-01-09 09:10:10 -0500
commit243dac2abb695d4901623e19a37f9942b1088aa9 (patch)
tree4b6495885b35231867eab6800e9a99714f9bd95c /src/mongo/db/storage/storage_engine_lock_file_posix.cpp
parent3b07deccd9ab61e4f515677abf420aff01984a37 (diff)
downloadmongo-243dac2abb695d4901623e19a37f9942b1088aa9.tar.gz
SERVER-16760 fixed file descriptor check when opening lock file
Diffstat (limited to 'src/mongo/db/storage/storage_engine_lock_file_posix.cpp')
-rw-r--r--src/mongo/db/storage/storage_engine_lock_file_posix.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/storage/storage_engine_lock_file_posix.cpp b/src/mongo/db/storage/storage_engine_lock_file_posix.cpp
index 126c53ec4c8..c37990e3c12 100644
--- a/src/mongo/db/storage/storage_engine_lock_file_posix.cpp
+++ b/src/mongo/db/storage/storage_engine_lock_file_posix.cpp
@@ -95,7 +95,7 @@ namespace {
}
int lockFile = ::open(_filespec.c_str(), O_RDWR | O_CREAT, S_IRWXU | S_IRWXG | S_IRWXO);
- if (lockFile <= 0) {
+ if (lockFile < 0) {
int errorcode = errno;
return Status(ErrorCodes::DBPathInUse, str::stream()
<< "Unable to create/open lock file: "