diff options
author | Spencer Jackson <spencer.jackson@mongodb.com> | 2016-03-08 15:10:15 -0500 |
---|---|---|
committer | Spencer Jackson <spencer.jackson@mongodb.com> | 2016-05-03 13:01:06 -0400 |
commit | 67fbb57210c9f22b03aacc777364cf8ed8cef5d2 (patch) | |
tree | 4e45a4e2b3375078284f0f60e64ec5d7ef69a7d8 /src/mongo/shell/shell_utils_launcher.h | |
parent | 9fac819a2b924cc2b7b1da76d24ecb09e6295d5e (diff) | |
download | mongo-67fbb57210c9f22b03aacc777364cf8ed8cef5d2.tar.gz |
SERVER-18877: Spawn process with environment variables
Diffstat (limited to 'src/mongo/shell/shell_utils_launcher.h')
-rw-r--r-- | src/mongo/shell/shell_utils_launcher.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mongo/shell/shell_utils_launcher.h b/src/mongo/shell/shell_utils_launcher.h index 8c4449aee41..860bf241e8c 100644 --- a/src/mongo/shell/shell_utils_launcher.h +++ b/src/mongo/shell/shell_utils_launcher.h @@ -111,8 +111,10 @@ public: /** Helper class for launching a program and logging its output. */ class ProgramRunner { public: - /** @param args The program's arguments, including the program name. */ - ProgramRunner(const BSONObj& args); + /** @param args The program's arguments, including the program name. + * @param env Environment to run the program with, which will override any set by the local + * environment */ + ProgramRunner(const BSONObj& args, const BSONObj& env); /** Launch the program. */ void start(); /** Continuously read the program's output, generally from a special purpose thread. */ @@ -129,6 +131,7 @@ private: void launchProcess(int child_stdout); std::vector<std::string> _argv; + std::map<std::string, std::string> _envp; int _port; int _pipe; ProcessId _pid; |