mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
log message instead of printing stack trace when can't kill ops on shell shutdown
This commit is contained in:
parent
ad6e86e451
commit
8c69ba521d
@ -86,8 +86,12 @@ void killOps() {
|
||||
for( map< const void*, string >::iterator i = mongo::shellUtils::_allMyUris.begin(); i != mongo::shellUtils::_allMyUris.end(); ++i )
|
||||
uris.push_back( i->second );
|
||||
mongo::BSONObj spec = BSON( "" << uris );
|
||||
auto_ptr< mongo::Scope > scope( mongo::globalScriptEngine->newScope() );
|
||||
scope->invoke( "function( x ) { killWithUris( x ); }", spec );
|
||||
try {
|
||||
auto_ptr< mongo::Scope > scope( mongo::globalScriptEngine->newScope() );
|
||||
scope->invoke( "function( x ) { killWithUris( x ); }", spec );
|
||||
} catch ( ... ) {
|
||||
mongo::rawOut( "exception while cleaning up any db ops started by this shell\n" );
|
||||
}
|
||||
}
|
||||
|
||||
void quitNicely( int sig ){
|
||||
|
Loading…
Reference in New Issue
Block a user