2009-01-15 11:26:38 -05:00
|
|
|
#include "../stdafx.h"
|
2009-01-15 10:08:20 -05:00
|
|
|
|
|
|
|
|
namespace mongo {
|
|
|
|
|
|
|
|
|
|
const char * curNs = "in client mode";
|
2009-06-05 10:35:04 -04:00
|
|
|
|
|
|
|
|
bool quiet = false;
|
|
|
|
|
|
2009-01-15 10:08:20 -05:00
|
|
|
// Database* database = 0;
|
2009-08-05 17:15:04 -04:00
|
|
|
|
|
|
|
|
bool dbexitCalled = false;
|
2009-01-15 10:08:20 -05:00
|
|
|
|
2009-08-05 16:00:27 -04:00
|
|
|
void dbexit( ExitCode returnCode, const char *whyMsg ) {
|
2009-08-05 17:15:04 -04:00
|
|
|
dbexitCalled = true;
|
2009-01-15 11:26:38 -05:00
|
|
|
out() << "dbexit called" << endl;
|
2009-01-15 10:08:20 -05:00
|
|
|
if ( whyMsg )
|
2009-01-15 11:26:38 -05:00
|
|
|
out() << " b/c " << whyMsg << endl;
|
|
|
|
|
out() << "exiting" << endl;
|
2009-01-25 16:25:36 -05:00
|
|
|
::exit( returnCode );
|
2009-01-15 10:08:20 -05:00
|
|
|
}
|
2009-08-05 17:15:04 -04:00
|
|
|
|
|
|
|
|
bool inShutdown(){
|
|
|
|
|
return dbexitCalled;
|
|
|
|
|
}
|
2009-01-15 10:08:20 -05:00
|
|
|
|
2009-01-15 10:17:11 -05:00
|
|
|
string getDbContext() {
|
2009-01-15 10:08:20 -05:00
|
|
|
return "in client only mode";
|
|
|
|
|
}
|
2009-09-10 10:36:11 -04:00
|
|
|
|
|
|
|
|
bool haveLocalShardingInfo( const string& ns ){
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2009-01-15 10:08:20 -05:00
|
|
|
}
|