Skip to content
Browse files

stub doPreServerStatupInits()

  • Loading branch information...
1 parent b469716 commit 6c99d204c1bad3f8585d6b751040ef2ea107ec77 @dwight dwight committed
Showing with 16 additions and 1 deletion.
  1. +8 −1 db/common.cpp
  2. +1 −0 db/db.cpp
  3. +1 −0 dbtests/dbtests.cpp
  4. +5 −0 pch.h
  5. +1 −0 s/server.cpp
View
9 db/common.cpp
@@ -1,4 +1,5 @@
-// common.cpp
+// @file common.cpp
+
/*
* Copyright (C) 2010 10gen Inc.
*
@@ -24,6 +25,12 @@
*/
namespace mongo {
+ /** called by mongos, mongod, test. do not call from clients and such.
+ invoked before about everything except global var construction.
+ */
+ void doPreServerStatupInits() {
+ }
+
/* we use new here so we don't have to worry about destructor orders at program shutdown */
MongoMutex &dbMutex( *(new MongoMutex("dbMutex")) );
View
1 db/db.cpp
@@ -549,6 +549,7 @@ string arg_error_check(int argc, char* argv[]) {
int main(int argc, char* argv[]) {
static StaticObserver staticObserver;
+ doPreServerStatupInits();
getcurns = ourgetns;
po::options_description general_options("General options");
View
1 dbtests/dbtests.cpp
@@ -22,5 +22,6 @@
int main( int argc, char** argv ) {
static StaticObserver StaticObserver;
+ doPreServerStatupInits();
return Suite::run(argc, argv, "/tmp/unittest");
}
View
5 pch.h
@@ -155,6 +155,11 @@ namespace mongo {
using boost::uint32_t;
using boost::uint64_t;
+ /** called by mongos, mongod, test. do not call from clients and such.
+ invoked before about everything except global var construction.
+ */
+ void doPreServerStatupInits();
+
} // namespace mongo
#endif // MONGO_PCH_H
View
1 s/server.cpp
@@ -371,6 +371,7 @@ int _main(int argc, char* argv[]) {
}
int main(int argc, char* argv[]) {
try {
+ doPreServerStatupInits();
return _main(argc, argv);
}
catch(DBException& e) {

0 comments on commit 6c99d20

Please sign in to comment.
Something went wrong with that request. Please try again.