summaryrefslogtreecommitdiff
path: root/shell/utils.h
blob: f69f67cce93223b38a7f8f4c018d506ed9a685eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// utils.h

#pragma once

#include "../scripting/engine.h"

namespace mongo {

    namespace shellUtils {

        void RecordMyLocation( const char *_argv0 );
        void installShellUtils( Scope& scope );

        // 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();
        };
        void KillMongoProgramInstances();
        
    }
}