shell : cleaner cleanup on exit

This commit is contained in:
dwight
2010-06-14 16:22:11 -04:00
parent 93fdeab943
commit 4eaaf25da3
2 changed files with 6 additions and 0 deletions

View File

@@ -32,6 +32,7 @@ jmp_buf jbuf;
#include "utils.h"
#include "../util/password.h"
#include "../util/version.h"
#include "../util/goodies.h"
using namespace std;
using namespace boost::filesystem;
@@ -162,6 +163,7 @@ void killOps() {
}
void quitNicely( int sig ){
mongo::goingAway = true;
if ( sig == SIGINT && inMultiLine ){
gotInterrupted = 1;
return;
@@ -625,6 +627,7 @@ int _main(int argc, char* argv[]) {
shellHistoryDone();
}
mongo::goingAway = true;
return 0;
}