2009-05-14 05:15:59 +02:00
|
|
|
// utils.h
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "../scripting/engine.h"
|
|
|
|
|
|
|
|
namespace mongo {
|
|
|
|
|
|
|
|
namespace shellUtils {
|
|
|
|
|
2009-05-14 17:42:52 +02:00
|
|
|
void RecordMyLocation( const char *_argv0 );
|
2009-05-14 05:15:59 +02:00
|
|
|
void installShellUtils( Scope& scope );
|
2009-05-14 17:42:52 +02:00
|
|
|
|
|
|
|
// Scoped management of mongo program instances. Simple implementation:
|
|
|
|
// destructor kills all mongod instances created by the shell.
|
|
|
|
struct MongoProgramScope {
|
|
|
|
MongoProgramScope() {} // Avoid 'unused variable' warning.
|
|
|
|
~MongoProgramScope();
|
|
|
|
};
|
2009-05-15 17:07:43 +02:00
|
|
|
void KillMongoProgramInstances();
|
2009-05-14 05:15:59 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
}
|