summaryrefslogtreecommitdiff
path: root/src/mongo/shell/dbshell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/shell/dbshell.cpp')
-rw-r--r--src/mongo/shell/dbshell.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/shell/dbshell.cpp b/src/mongo/shell/dbshell.cpp
index ceafa7375b5..8abfcecbc9f 100644
--- a/src/mongo/shell/dbshell.cpp
+++ b/src/mongo/shell/dbshell.cpp
@@ -424,6 +424,10 @@ string finishCode( string code ) {
return code;
}
+namespace mongo {
+ extern bool isShell;
+}
+
bool execPrompt( mongo::Scope &scope, const char *promptFunction, string &prompt ) {
string execStatement = string( "__prompt__ = " ) + promptFunction + "();";
scope.exec( "delete __prompt__;", "", false, false, false, 0 );
@@ -584,6 +588,7 @@ static void edit( const string& whatToEdit ) {
}
int _main( int argc, char* argv[], char **envp ) {
+ mongo::isShell = true;
setupSignalHandlers(true);
setupSignals();