summaryrefslogtreecommitdiff
path: root/db/db.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'db/db.cpp')
-rw-r--r--db/db.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/db/db.cpp b/db/db.cpp
index f8f1d10bcfd..489287d2773 100644
--- a/db/db.cpp
+++ b/db/db.cpp
@@ -943,13 +943,13 @@ namespace mongo {
#undef out
- void exitCleanly() {
+ void exitCleanly( ExitCode code ) {
goingAway = true;
killCurrentOp = 1;
{
dblock lk;
log() << "now exiting" << endl;
- dbexit( EXIT_KILL );
+ dbexit( code );
}
}
@@ -995,7 +995,7 @@ namespace mongo {
int x;
sigwait( &asyncSignals, &x );
log() << "got kill or ctrl c signal " << x << " (" << strsignal( x ) << "), will terminate after current cmd ends" << endl;
- exitCleanly();
+ exitCleanly( EXIT_KILL );
}
void setupSignals() {
@@ -1018,7 +1018,7 @@ namespace mongo {
#else
void ctrlCTerminate() {
log() << "got kill or ctrl c signal, will terminate after current cmd ends" << endl;
- exitCleanly();
+ exitCleanly( EXIT_KILL );
}
BOOL CtrlHandler( DWORD fdwCtrlType )
{