summaryrefslogtreecommitdiff
path: root/src/mongo/db/server_options_helpers.h
diff options
context:
space:
mode:
authorKevin Pulo <kevin.pulo@mongodb.com>2016-08-16 22:08:49 +1000
committerKevin Pulo <kevin.pulo@mongodb.com>2016-08-16 22:10:46 +1000
commit512a1d57f6b3560cc3531355676cf06d362c93a1 (patch)
tree4a4c8585f07e48a6c3c6b009e28d65ea402c9e56 /src/mongo/db/server_options_helpers.h
parent51fe71a4169d8ac01dca915b482c94e228d8a746 (diff)
downloadmongo-512a1d57f6b3560cc3531355676cf06d362c93a1.tar.gz
SERVER-24914 SERVER-24915 improve getting cwd at server startup
Diffstat (limited to 'src/mongo/db/server_options_helpers.h')
-rw-r--r--src/mongo/db/server_options_helpers.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/mongo/db/server_options_helpers.h b/src/mongo/db/server_options_helpers.h
index f97ab00e795..88002c7228b 100644
--- a/src/mongo/db/server_options_helpers.h
+++ b/src/mongo/db/server_options_helpers.h
@@ -62,7 +62,21 @@ Status validateServerOptions(const moe::Environment& params);
*/
Status canonicalizeServerOptions(moe::Environment* params);
-Status storeServerOptions(const moe::Environment& params, const std::vector<std::string>& args);
+/**
+ * Sets up the global server state necessary to be able to store the server options, based on how
+ * the server was started.
+ *
+ * For example, saves the current working directory in serverGlobalParams.cwd so that relative paths
+ * in server options can be interpreted correctly.
+ */
+Status setupServerOptions(const std::vector<std::string>& args);
+
+/**
+ * Store the given parsed params in global server state.
+ *
+ * For example, sets the serverGlobalParams.port variable based on the net.port config parameter.
+ */
+Status storeServerOptions(const moe::Environment& params);
void printCommandLineOpts();