diff --git a/db/db.cpp b/db/db.cpp index a278912b973..ba26ee550cc 100644 --- a/db/db.cpp +++ b/db/db.cpp @@ -601,8 +601,8 @@ namespace mongo { { dblock lk; log() << "now exiting" << endl; + exit(12); } - exit(12); } void setupSignals() { diff --git a/db/db.h b/db/db.h index cc292112537..38af71bd376 100644 --- a/db/db.h +++ b/db/db.h @@ -50,7 +50,7 @@ namespace mongo { } }; - extern boost::mutex dbMutex; + extern boost::mutex &dbMutex; extern MutexInfo dbMutexInfo; //extern int dbLocked; diff --git a/db/instance.cpp b/db/instance.cpp index 277617bcae6..59fa0e54111 100644 --- a/db/instance.cpp +++ b/db/instance.cpp @@ -40,7 +40,7 @@ namespace mongo { bool master = false; // true means keep an op log extern int curOp; - boost::mutex dbMutex; + boost::mutex &dbMutex( *(new boost::mutex) ); MutexInfo dbMutexInfo; //int dbLocked = 0; diff --git a/db/repl.cpp b/db/repl.cpp index 6bd9e2b84ad..6e71f7dbc66 100644 --- a/db/repl.cpp +++ b/db/repl.cpp @@ -49,7 +49,7 @@ namespace mongo { extern bool quiet; - extern boost::mutex dbMutex; + extern boost::mutex &dbMutex; extern long long oplogSize; int _updateObjects(const char *ns, BSONObj updateobj, BSONObj pattern, bool upsert, stringstream& ss, bool logOp=false); bool _runCommands(const char *ns, BSONObj& jsobj, stringstream& ss, BufBuilder &b, BSONObjBuilder& anObjBuilder, bool fromRepl); @@ -256,7 +256,7 @@ namespace mongo { result.append("ismaster", 1); result.append("msg", "not paired"); } - + return true; } } cmdismaster;