mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 00:56:44 +01:00
SERVER-705 exit cleanly from db.cpp instead of instance.cpp
This commit is contained in:
parent
cfe99b6363
commit
df00eaacf5
@ -67,6 +67,8 @@ namespace mongo {
|
|||||||
void pairWith(const char *remoteEnd, const char *arb);
|
void pairWith(const char *remoteEnd, const char *arb);
|
||||||
void setRecCacheSize(unsigned MB);
|
void setRecCacheSize(unsigned MB);
|
||||||
|
|
||||||
|
void exitCleanly( ExitCode code );
|
||||||
|
|
||||||
const char *ourgetns() {
|
const char *ourgetns() {
|
||||||
Client *c = currentClient.get();
|
Client *c = currentClient.get();
|
||||||
if ( ! c )
|
if ( ! c )
|
||||||
@ -242,6 +244,9 @@ namespace mongo {
|
|||||||
problem() << "SocketException in connThread, closing client connection" << endl;
|
problem() << "SocketException in connThread, closing client connection" << endl;
|
||||||
dbMsgPort.shutdown();
|
dbMsgPort.shutdown();
|
||||||
}
|
}
|
||||||
|
catch ( const ClockSkewException &e ) {
|
||||||
|
exitCleanly( EXIT_CLOCK_SKEW );
|
||||||
|
}
|
||||||
catch ( std::exception &e ) {
|
catch ( std::exception &e ) {
|
||||||
problem() << "Uncaught std::exception: " << e.what() << ", terminating" << endl;
|
problem() << "Uncaught std::exception: " << e.what() << ", terminating" << endl;
|
||||||
dbexit( EXIT_UNCAUGHT );
|
dbexit( EXIT_UNCAUGHT );
|
||||||
|
2
db/db.h
2
db/db.h
@ -205,8 +205,6 @@ namespace mongo {
|
|||||||
|
|
||||||
extern TicketHolder connTicketHolder;
|
extern TicketHolder connTicketHolder;
|
||||||
|
|
||||||
void exitCleanly( ExitCode code );
|
|
||||||
|
|
||||||
} // namespace mongo
|
} // namespace mongo
|
||||||
|
|
||||||
//#include "dbinfo.h"
|
//#include "dbinfo.h"
|
||||||
|
@ -339,9 +339,6 @@ namespace mongo {
|
|||||||
ss << " exception " + e.toString();
|
ss << " exception " + e.toString();
|
||||||
log = true;
|
log = true;
|
||||||
}
|
}
|
||||||
catch ( ClockSkewException &e ) {
|
|
||||||
exitCleanly( EXIT_CLOCK_SKEW );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
currentOp.ensureStarted();
|
currentOp.ensureStarted();
|
||||||
|
Loading…
Reference in New Issue
Block a user